Page 1 :
SAY 2019, Part III, , p, pp, Computer, Applications, HSE II, , Maximum: 60 scores, , ve, ., , in, , Answer all questions from 1 to 5. Each carries 1 score, [5x1=5], 1.Accessing each element of an array at least once to perform any operation is known as, ------------- operation., Ans. Traversal, 2.Name the Mathematical function which returns the absolute value of an integer number., Ans. abs(), 3. ------------ is a JavaScript function used to include a text in the body section of a webpage, Ans. document.write(), 4. The rules enforced on data that are entered into column of a table are called-----------------., Ans. Constraints, 5. --------------- is an open source ERP, Ans. ODOO, Answer any 9 questions from 6 to 16. Each carries 2 scores, , [ 9x2 = 18 ], , Hs, sli, , 6. Identify the four components of for loop-initialization expression, test expression, body of, the loop, update expression in the C++ code given below :, for(count=1 ; count< = N; count++), {, Sum=sum + count;, }, cout<<”sum=”<<sum;, Ans., 1.Initialisation Expression: count=1;, 2.Test Expression: count<=N;, 3.Body of the loop: sum = sum + count;, 4.update expression: count++;, 7. What are the differences in string handling using cin and gets( ) in C++ programs?, Ans., cin, cin cannot read white spaces, cin is an operator, , gets( ), gets ( ) can read whitespaces, gets ( ) is a function, , 8. Write HTML tags used to insert comments in HTML web pages., Ans. To insert comments, use <!-- and -->, 9. What is the use of <frameset >tag in HTML? List any two attributes of this tag, Ans. <frameset> tag is used to divide a web page into different windows. Two attributes of, <frameset> tag are:, 1. cols: This attribute determines the number and dimensions of vertical frames
Page 2 :
2. rows: This attribute determines the number and dimensions of horizontal frames, 10. Differentiate cellspacing and cellpadding., Ans. Cellspacing attributes specifies determines the space to the left between cells., Cellpadding is the space between the content and cell border. We can increase and decrease, both cellspacing and cellpadding., , in, , 11. Write any two method to include scripts in the HTML document., Ans. Two methods to include scripts in HTML document are:, 1) Inside <head> - As the body section of the HTML page contains large volume of text,, this is said to be the best practice. This avoids the confusion of web designer., 2) As an external file with explanations – Here, the script file is linked to the HTML file, as an external file., , ve, ., , 12. Write short notes on responsive web design., Ans. Responsive web design is the custom of building a website suitable to work on every, device, and every screen size, no matter how large or small, mobile phone or desktop or, television., , Hs, sli, , 13. Define view in SQL and the syntax of command used to create a view., Ans. A view is a virtual table that does not really exist in the database, but is derived from, one or more tables. Syntax used to create a view is:, CREATE VIEW <view name>, AS SELECT <column name1> [,<columnname2>], FROM <tablename>, [WHERE <condition> ];, 14. Write short note on MIS., Ans. There are three components in MIS - Management, Information and System. Management, is the ultimate user or the decision maker, information is the processed data and system is the, integration and holistic view of the enterprise., 15. Define the following terms :, (a) Cyber forensics, (b) Infomania, Ans. ( a ) Cyber forensics: Cyber forensics can be defined as the discipline that combines, elements of law and computer science to collect and analyse data from computer systems,, networks, communication systems and storage devices in a way that is admissible as evidence, in a court of law., ( b) Infomania is the state of getting exhausted with excess information. It occurs due to, accumulation of information from many sources like Internet, e-mail and cell phones, but, cannot be processed., 16. Explain any two built-in functions in C++ that are used for string manipulation., Ans. 1. strcpy() This function is used to copy one string into another. The syntax of the function, is: strcpy(string1, string2); The function will copy string2 to string1.
Page 3 :
2. strcat() This function is used to append one string to another string. The length of the, resultant string is the total length of the two strings. The syntax of the functions is:, strcat(string1, string2); Here string1 and string2 are array of characters or string, constants. string2 is appended to string1., ., Answer any 9 questions from 17 to 28. Each carries 3 Scores, , [9 x 3 = 27 ], , ve, ., , in, , 17. Compare break and continue statements in C++., Ans., Break, continue, it takes the program control outside the Takes the control outside the loop by, immediate enclosing loop, skipping the remaining part of the loop • ......., Program control goes outside only when the A continue statement will just abandon the, test expression of the loop returns false, current iteration and let the loop continue, with next iteration., break is used in loops as well as in decision Continue statement is used only within loops, statements such as switch statement, , Hs, sli, , 18. (a) Define Modular Programming., (b) Explain the merits of Modular programming, Ans. (a ) In programming, the entire problem will be divided into small sub problems that, can be solved by writing separate programs. This kind of approach is known as modular, programming. Each sub task will be considered as a module and we write programs for each, module. The process of breaking large programs into smaller sub programs is called, modularization., ( b ) Merits of Modular Programming, 1.Reduces the size of the program, 2. Less chance of error occurrence, 3. Reduces programming complexity:, 4. Improves reusability, 19. Consider the following C++ code :, if (a = = 1), cout<<”Binary digit" ;, else if (a = = 0), cout<<"Binary digit";, else, cout<<”Not a binary digit";, , Rewrite the code using switch statement., Ans., switch(a), {, case 1:, cout<<”Binary digit”;, break;, case 2:, cout<<”Binary digit”;, break;
Page 4 :
default:, , cout<<”Not a binary digit";, , }, 20. (a) Define an array., (b) Write C++ statement to declare a character array of size20., (c) Write C++ statement to store the string "Welcome" in the same array., Ans. An array is a collection of elements of the same type placed in contiguous memory, location under a same variable name, a) char name[20];, b) char str[ ] = ”welcome”;, , Hs, sli, , ve, ., , in, , 21. Suppose you are browsing the website www.keralapsc.gov.in: Explain how DNS resolves, the, IP address, Ans., 1. All browsers store the IP addresses of the recently visited websites in its cache. Therefore,, the browser first searches its local memory to see whether it has the IP address, www.keralapsc.gov.in If found, the browser uses it, 2. If it is not found in the browser cache, it checks the operating system's local cache for the, IP address., 3. If it is not found there, it searches the DNS server of the local ISP., 4. In the absence of the domain name in the ISP's DNS server, the ISP's DNS server, initiates a recursive search starting from the root server till it receives the IP address., 5. The ISP's DNS server returns this IP address to the browser., 6. The browser connects to the web server using the IP address of www.keralapsc.gov.in, and the webpage is displayed in the browser window. If the IP address is not found, it, returns the message 'Server not found' in the browser window, 22. Write HTML code to display the following :, (a) (a+b)2 = a2 + 2ab + b2, (b) © Department of Education, Ans., (a) (a+b)<sup>2</sup>=a<sup>2</sup>+2ab+b<sup>2</sup>, (b) © Department of Education, 23. Write any three built-in functions in JavaScript and explain its use., Ans., a. alert() function: This function is used to display a message on the screen. For example,, the statement alert(“Welcome to JavaScript”); will display the following message, window on the browser window, , Welcome to java script, , ok, , b. isNaN() function: This function is used to check whether a value is a number or not. In, this function, NaN stands for Not a Number., c. toUpperCase( ) function: This function returns the upper case form of the given string
Page 5 :
in, , 24. Briefly explain different types of web hosting, Ans. Three types of web hosting:, 1.Shared hosting: In shared hosting many different websites are stored on one single web, server and they share resources like RAM and CPU. Shared hosting is most suitable for small, websites that have less traffic. Shared servers are cheaper and easy to use., 2. Dedicated hosting: Dedicated web hosting is the hosting where the client leases the entire, web server and all its resources. The web server is not shared with any other website. Websites, of large organisations, government departments, etc. where there are large numbers of visitors,, opt for dedicated web hosting., 3. Virtual Private Server: A Virtual Private Server (VPS) is a physical server that is virtually, partitioned into several servers using the virtualization technology. Each VPS works similar to a, dedicated server and has its own separate server operating system, web server software and, packages like e-mail, databases, etc. installed in it., , ve, ., , 25. Explain any three fundamental operations in relational algebra., Ans., 1. SELECT operation is used to select rows from a relation that satisfies a given predicate., The predicate is a user defined condition to select rows of user's choice. This operation, is denoted using lower case letter sigma (σ ). The general format of select is as follows:, , σ condition (Relation)., , 2. The PROJECT operation selects certain attributes from the table and forms a new, relation. If the user is interested in selecting the values of a few attributes, rather than, all the attributes of the relation, then use PROJECT operation. It is denoted by lower, , Hs, sli, , case letter π . The general format of project operation is as follows:, , π A1, A2,…., An (Relation), , 3. UNION operation is a binary operation and it returns a relation containing all tuples, appearing in either or both of the two specified relations. It is denoted by ., 26. Explain benefits of ERP system, Ans. Benefits of ERP system are:, 1. Improved resource utilization: An enterprise can plan and manage its resources effectively by, installing ERP software. So, the wastage or loss of all types of resources can be reduced, and, improved resource utilization can be ensured., 2. Better customer satisfaction: Customer satisfaction means meeting maximum customers’, requirements for a product or service., 3. Provides accurate information In today's competitive world, an enterprise has to plan and, manage the future cleverly. So, an enterprise needs high quality, relevant and accurate, information., 27. Briefly explain the application of RFID (Radio Frequency Identification) Technology in the, field of business logistics, Ans., Radio Frequency Identification (RFID) technology can be used to identify, track, sort or, detect a wide variety of objects in logistics. RFID hardware consists of a RFID tag and a reader., The RFID tag consists of a combination of transmitter and responder. This tag contains a, microchip for storing data and a sending and receiving antenna for data exchange with the
Page 6 :
RFID reader. RFID gives transportation and logistics operations increased visibility into, product movement and business processes. It increases efficiency by providing real-time data, that gives up-to-date information about the products., Answer any 2 questions from 28 to30. Each carries 5 scores, , [2 x 5 = 10 ], , 28. (a) Explain any two types of lists in HTML, (b) Write HTML code to display the following list :, , in, , Memory Devices, V. Registers, VI. Cache, VII. RAM, VIII. Hard Disk, , Hs, sli, , ve, ., , Ans., (a) Two types of Lists in HTML:, 1.Unordered list: Unordered lists or bulleted lists display a bullet or other graphic in front of, each item in the list. We can create an unordered list with the tag pair<ul> and </ul>. Each item, in the list is presented by using the tag pair <li> and</li>, 2.Ordered List: Ordered lists present the items in some numerical or alphabetical order., HTML provides the tag pair <ol>and </ol>to create an ordered list. The items in the ordered list, are presented by <Li> and </Li>. The ordered list is also called numbered list., b) <body>, <center>, Memory Devices, <ol type = ”I” start=”5”>, <LI> Registers</LI>, <LI> cache</LI>, <LI> RAM</LI>, <LI> Harddisk</LI>, </ol>, </center></body>, 29 In DBMS, (a) Explain classification of database users, (b) Define the terms – Cardinality, Schema and Alternate key, Ans., a) 1. Database Administrator (DBA) : The person who is responsible for the control of the, centralized and shared database is the Database Administrator (DBA)., 2. Application Programmers : Application programmers are computer professionals who, interact with the DBMS through application programs, 3. Sophisticated Users : Sophisticated users include engineers, scientists, business, analysts, and others who are thoroughly familiar with the facilities of the DBMS., 4. Naive Users: Naive users interact with the system by invoking one of the application, programs that were written previously. They are not even aware of the details of the, DBMS.
Page 7 :
b) Cardinality: The number of rows or tuples in a relation is called cardinality of the relation, Schema: The description or structure of a database is called the database schema, which, is specified during database design. In the relational model, the schema for a relation, specifies its name, the name of each column, and the type of each column, Alternate Key: A candidate key that is not the primary key is called an alternate key, , Course, commerce, Commerce, Commerce, Humanities, Science, Science, Science, , score, 90, 85, 75, 60, 45, 75, 60, , in, , 30. Consider the following table student :, Roll No, AdmNo, Name, 11, 2008, Abdulla, 12, 2009, Prasanth, 13, 2010, Jins, 14, 2011, Praveen, 11, 2012, Prasanth, 12, 2013, Pallavi, 13, 2014, Faizal, , Hs, sli, , ve, ., , a) Can u suggest an attribute that can be selected as primary key? Justify your answer., b) Write SQL query to change the course attribute value 'Humanities' of the student Praveen, to 'Commerce'., (c) Write SQL query to display the name and score of all students who scored greater than 60., (d) Write SQL query to remove the details of students who scored less than 50., Ans., a) AdmNo can be selected as primary Key. No other keys can be selected to uniquely identify, each student. Here the domain of Roll No, Name, Course and score consists of duplicate values, b) Alter student set course = ‘Commerce‘ where name= ‘ Praveen’;, c) Select name, score from student where score>60;, d) Delete from student where score<50;
Page 8 :
March 2019, Part III, , Computer Applications, HSE II, , Maximum: 60 scores, , Answer all questions from 1 to 5. Each carries 1 score, , [5x1=5], , 2. _____ character is stored at the end of the string., Ans. ‘\0’ or NULL, , in, , 1. The input operator in C++ is _________, Ans. >> or get from or cin or extraction., , ve, ., , 3. The process of breaking large program into smaller sub - programs is called ______, Ans. Modularity, 4. Name the keyword used to declare variable in JavaScript., Ans. var, 5. Expand MIS, Ans. Management Information System, , Hs, sli, , Answer any 9 questions from 6 to 16. Each carries 2 scores, ], 6. List the type modifiers in C++., Ans., 1. Signed, 2. Unsigned, 3. Long, 4. short, 7. Rewrite the following code using for loop :, int i = 1;, start :, cout << x;, x = x+5;, if(x<=50), go to start;, Ans., for(x=1; x<=50;x++), {, cout<<x;, }, 8 i) Define an Array., , [ 9 x 2 = 18
Page 9 :
(ii) Initialize an integer array with 5 elements., Ans., 1) Array is a collection of elements of same datatype stored in continuous memory under a, common name., ii) int arr[5]={1,2,3,4,5};, 9.Write the port number for the following web services :, (i) Simple Mail Transfer protocol, (ii) HTTP secure (HTTPS), Ans:, i), 25, ii), 443, , ve, ., , in, , 10. What is the use of frame tag in HTML ? What is its limitation ?, Ans., Frame tag is used to specify the name of HTML page which is to be loaded in the frame, created by frameset tag. Limitation of frame tag is that earlier browsers did not support frames., , Hs, sli, , 11. Write the HTML code to display the following using list tag :, (i) Biology Science, (ii) Commerce, (iii) Humanities, Ans., <Body>, <OL type=”i”>, <LI> Biology Science</LI>, <LI> Commerce</LI>, <LI> Humanities</LI>, </OL>, </Body>, , 12. What is the difference between isNaN( ) and Number( ) functions in JavaScript ?, Ans:, isNaN(): Built in function used to check whether a given argument is not a number., Number(): Function used to convert the given character to number, 13. What is CMS ? Give two examples, Ans., Content Management System (CMS) refers to a web based software system which is, capable of creating, administering and publishing websites. CMS provides an easy way to, design and manage attractive websites., Eg: Jhoomla, drupal, 14. First table containing 4 rows and 3 columns, second table contains 5 rows and 2 columns,, then the cartesian product table contains------------ rows and -----------------columns,, Ans. 20, 5
Page 10 :
15. How Business Process Reengineering (BPR) is related to Enterprise Resource Planning, (ERP)?, Ans, Business process re-engineering is performed before enterprise resource planning. Conducting, business process re-engineering before implementing enterprise resource planning will help an, enterprise to avoid unnecessary modules from the software., , ve, ., , in, , 16. Define the terms :, i) Cyber Forensics, II) Infomania., Ans, ( a ) Cyber forensics: Cyber forensics can be defined as the discipline that combines, elements of law and computer science to collect and analyze data from computer, systems, networks, communication systems and storage devices in a way that is, admissible as evidence in a court of law., ( b) Infomania is the state of getting exhausted with excess information. It occurs due, to accumulation of information from many sources like Internet, e-mail and cell, phones, but cannot be processed., Answer any 9 questions from 17 to 28. Each carries 3 Scores, , [ 9 x 3 = 27 ], , Hs, sli, , 17. Compare the selection statements 'if ' and 'switch'., Ans., if, Switch, Can be used for any type cases or variables, Can be used for integers or character, constants, More flexible, Less flexible, Can be applied to check the range of values, Cannot be used to check range of values, 18. Write a program in C++ to accept a string with white space like "good morning" from the, keyboard and display the same, Ans., #include<iostream>, #include<cstdio>, int main(), {, char str1[25];, cout<<”Enter a string”;, gets(str1);, puts(str1);, }, 19. Compare static webpage and dynamic webpage., Ans., Static, Content and layout remain fixed, Doesn’t use database, Easy to develop, , Dynamic, Content and layout will change, Use database, Require Programming skill to develop
Page 11 :
20. (i) What is the use of reserved characters for HTML entities?, (ii) List any four reserved characters and its use., Ans., i) In HTML, the symbols like <, &, etc. have special meaning and cannot be used in the, HTML documents as part of the text content. The browser treats these symbols as the, punctuation marks of HTML words like tags and entities. These Symbols are displayed as, HTML entities., ii) < < Less than, > > Greater than, © © - Copyright Symbol, ™ &trade - Trademark Symbol, , ve, ., , in, , 21. Write the built in functions in JavaScript used for the following situations, i) Display warning message in the screen, ii) character at a particular position, iii) convert uppercase to lowercase, Ans., i), alert()., ii), charAt()., iii) toUpperCase()., , Hs, sli, , 22. Write the merits and demerits of free webhosting, Ans., Merits: Free hosting provides web hosting services free of charge. Some free web hosting, companies provide domain name registration services also. Free web hosting is useful for, sharing content on the web, among groups having similar interests like family unions,, non-profit organisations, etc. who are not able to spend money on web hosting., Demerits: The service provider displays advertisements in the websites hosted to meet, the expenses. The size of the files that can be uploaded may be limited (supports upto 5, MB only), audio/video files (mp3, mp4, etc.) may not be permitted and so on, 23. What is key ? Explain any two keys in a relational database management system?, Ans., A key is an attribute or a collection of attributes in a relation that uniquely distinguishes, each tuples from other tuples in a given relation., Candidate key : A candidate key is the minimal set of attributes that uniquely identifies a, row in a relation. There may be more than one candidate key in a relation., . Primary key: A primary key is one of the candidate keys chosen to be the unique identifier for, that table by the database designer. A primary key is a set of one or more attributes that can, uniquely identify tuples within the relation., 24. Define the term Data independence. Explain different levels of data independence., Ans. The ability to modify the schema definition in one level without affecting the schema, definition at the next level is called data independence. There are two levels of data, independence, physical data independence and logical data independence.
Page 12 :
a. Physical data independence Physical data independence refers to the ability to modify the, schema followed at the physical level without affecting the schema followed at the, conceptual level., b. Logical data independence Logical data independence refers to the ability to modify a, conceptual schema without causing any changes in the schema followed at view (external), level., , ve, ., , in, , 25. Explain any three situations to modify the structure of a table with the help of alter, command in sql., Ans., 1. Adding a new column One or more columns can be added at any position in an existing, table. The syntax for adding a new column to a table is:, ALTER TABLE <table name>, ADD <column name> <datatype>[<size>] [<constraint>], [FIRST | AFTER <column, name>];, 2. Renaming a table: We can rename a table in the database by using RENAME TO along, with ALTER TABLE command. The syntax for renaming a table is:, ALTER TABLE <table name> RENAME TO <new tablename> ;, 3. Removing column from a table: If we want to remove an existing column from a table,, we can use DROP clause along with ALTER TABLE command. The syntax for removing a, column from a table is:, ALTER TABLE < table name>DROP<column name> ;, , Hs, sli, , 26. Explain the merits of ERP system., Ans., 1. Improved resource utilization: An enterprise can plan and manage its resources, effectively by installing ERP software. So the wastage or loss of all types of resources, can be reduced, and improved resource utilization can be ensured., 2. Better customer satisfaction : Using an ERP system, a customer will get more, attention and service of an enterprise without spending more money and time. A, customer can place the order, track the status of the order and make the payment from, his/her home., 3. Provides accurate information:, An enterprise needs high quality, relevant and, accurate information. An ERP system will be able to provide such information for the, better future planning of the enterprise., 4. Decision making capability: Accurate and relevant information given to decision, makers will help them to take better decisions for running a system more smoothly., 27. Compare GPRS and EDGE, Ans., GPRS is a packet oriented mobile data service on GSM. When compared to, conventional GSM, users of GPRS benefited from shorter access time and higher data, rates. GPRS allows billing based on volume of data transferred., EDGE is a digital mobile phone technology that allows improved, data transmission rates for GSM. EDGE is a superset to GPRS and can function on any, network with GPRS. It provides nearly three times faster speeds than the GPRS system.
Page 13 :
Answer any 2 questions from 28 to30. Each carries 5 scores, , in, , 28. Identify the built in C++ function for the following cases :, (i) to convert -25 to25., (ii) compare ‘computer’ and ‘COMPUTER’ ignoring cases., (iii) to check the given character is digit or not., (iv) to convert the character From ‘B’ to ’b’., (v) to find the square root of 64 or a number., Ans., i), abs()., ii), strcmpi()., ii), isdigit()., iv), tolower()., v), sqrt()., , Username, Password, , Reset, , Hs, sli, , Submit, , ve, ., , 29. (i). Write the name of tag used to group related data in an HTML form., ii). Write the HTML code to display the following web page :, , Ans., i), <fieldset>, ii), <Body>, <form>, Username <input type=”text” >, Password <input type=”password”>, <input type=”submit” value=”submit”>, <input type=”reset” value=”reset”>, </form>, </Body>, , 30 Consider the table student with attribute admno, Name, course, percentage., Write the SQL statements to do the following :, i), Display all the student details., ii), Modify the course ’ Commercce ‘ to ‘ Science ‘., (iii), Remove the student details with percentage below 35., (iv), create a view from the above table with percentage greater than 90., Ans., i), select * from student;, ii) update student set course=’Science’ where course=’Commerce’;, ii), delete from student where percentage<35;, iv) create view stud as select * from student where percentage >90;, , [2 x 5 = 10 ]
Page 14 :
Say 2018, Part III, , Computer Applications, HSE II, , Maximum: 60 scores, , Answer all questions from 1 to 5. Each carries 1 score, , [5x1=5], , 1. Write the name of built in function of C++ to convert given character into lower case., Ans. tolower ( ), , in, , 2. Which is the tag used to create a line break in HTML page., Ans. <br>, , 3. A candidate key that is not a primary key is called ---------- key., Ans. Alternate key, , 5. Expand the term CDMA., Ans. Code Division Multiple Access, , ve, ., , 4. Which is the keyword used to eliminate duplicate values in the selection?, Ans. Distinct, , Hs, sli, , Answer any 9 questions from 6 to 16. Each carries 2 scores, , [9 x 2 = 18 ], , 6. Write the function prototypes for the following function:, (i) A function sum() takes two integer arguments and return integer value., (ii) A function print() has no arguments and no return value., Ans., (i) int sum(int,int);, (ii) void print();, 7. Differentiate actual arguments and formal arguments in C++., Ans. The variables used in the function definition as arguments are known as formal arguments., The constants, variables or expressions used in the function call are known as actual (original), arguments., 8. Write the output of the following html code:, <ol type=1 start=10>, <li>keyboard</li>, <li>mouse</li>, <li>light pen</li>, </ol>, Ans., 10. keyboard, 11. mouse, 12. light pen
Page 15 :
9. Describe any four values of type attributes of the <input> tag in html., Ans. type=text – To create a textbox, type=password – To create a password box, type=radio – to create a radio button, type=checkbox – to create a check box, 10. Write short note on Virtual Private Server., Ans. A Virtual Private Server (VPS) is a physical server that is virtually partitioned into several, servers using the virtualization technology. Each VPS works similar to a dedicated server and, has its own separate server operating system, web server software and packages like e-mail,, databases, etc. installed in it., , in, , 11. Define primary key and alternate key, Ans. A primary key is a set of one or more attributes that can uniquely identify tuples within the, relation., A candidate key that is not a primary key is called alternate key, , ve, ., , 12. Write short note on union operation in relational algebra, Ans. UNION operation is a binary operation and it returns a relation containing all tuples, appearing in either or both of the two specified relations. It is denoted by , , Hs, sli, , 13. Differentiate between CHAR and VARCHAR in SQL, Ans. The CHAR is a fixed length character data type., VARCHAR represents variable length strings. It is similar to CHAR , but the space allocated, for the data depends only on the actual size of the string, not on the declared size of the column., 14. Write short note on Supply Chain Management, Ans. Supply Chain Management (SCM) is a systematic approach for managing supply chain., SCM activities include inventory management, transportation management etc., 15. Write a short note on mobile operating system, Ans. A mobile operating system is the operating system used in a mobile device (smart phone,, tablet, etc.), similar to an operating system used in a desktop or laptop computer. Popular, mobile operating systems are Android from Google, iOS from Apple, BlackBerry OS from, BlackBerry and Windows Phone from Microsoft., 16. Define the following term:, (i) SIM, (ii) MMS, Ans., (i) SIM (Subscriber Identity Module) cards help to identify a subscriber, roam across, networks and provide security to value added services like Internet browsing, mobile, commerce, mobile banking, etc., (ii) Multimedia Messaging Service (MMS) is a standard way to send and receive, messages that consists of multimedia content using mobile phones.
Page 16 :
Answer any 9 questions from 17 to 27. Each carries 3 Scores, , [9 x 3 = 27 ], , ve, ., , in, , 17. Rewrite the following C++ code using if else statement :, switch(choice), {, case 1: cout<<”one”;, break;, case 0: cout<<”zero”;, break;, default: cout<<”end”;, break;, }, Ans., if (choice = =1), cout<<”one”;, else if(choice= =0), cout<<”zero”;, else, cout<<”end;, , Hs, sli, , 18. Write the output of the following C++ code. Justify your answer., for(i=1;k=5;++i), {, cout<<”/t”<<i;, if(i= =3), break;, }, Ans. Question wrong, 19. Consider the following C++ code :, (a) char name[20];, cin>>name;, cout<<name;, , (b) char name[20];, gets(name);, cout<<name;, Write the answers in both cases if the string entered value is “NEW DELHI”. Justify your, answer., Ans. In the code (a), the answer will be “NEW” because the cin operator will not consider the, string after white space., In the code (b), the answer will be “NEW DELHI” because the gets() function will, accept strings with white spaces., 20. Define array traversal with an example., Ans. Accessing each element of an array at least once to perform any operation is known as, traversal operation. Displaying all the elements of an array is an example of traversal., E. g.
Page 17 :
Hs, sli, , ve, ., , 21. Consider the following function definition in C++ :, void sum(int a, int b=10, int c=20), {, int sum=a+b+c;, cout<<sum;, }, Write the output of the following function call :, (a) sum(1,2,3);, (b) sum(2,3);, (c) sum(3);, Ans. (a) 6 (1+2+3), (b) 25 (2+3+20), (c) 33 (3+10+20), , in, , #include <iostream>, using namespace std;, int main(), {, int a[5], i;, cout<<"Enter the elements of the array :";, for(i=0; i<5; i++), cin >> a[i];, //Reading the elements, for(i=0; i<5; i++), a[i] = a[i] + 1;, // A case of traversal, cout<<"\nNow value of elements in the array are...\n";, for(i=0; i<5; i++), cout<< a[i]<< "\t";, // Another case of traversal, return 0;, }, , 22. Compare client side scripting and server side scripting, Ans., Client side scripting, Server side scripting, Script is copied to the client browser, , Script remains in the web server, , Script is executed in the client browser, , Script is executed in the web server, , Client side scripts are mainly used for, validation of data., , Server side scripts are usually used to connect to, databases and return data from the web server, , 23. Write the HTML code to generate the following table:, Rollno, Name, , Class, , 100, , Vishnu, , C1, , 101, , Anupama, , C2, , 102, , Biju, , A1
Page 18 :
Ans., <html>, <body>, <table>, <tr>, <tr>, <tr>, <tr>, </table>, </body>, </html>, , <th>Rollno</th>, <td>100</th>, <th>101</th>, <th>102</th>, , <th>Name</th>, <td>Vishnu</th>, <th>Anupama</th>, <th>Biju</th>, , <th>Class</th>, <td>C1</th>, <th>C1</th>, <th>A1</th>, , </tr>, </tr>, </tr>, </tr>, , ve, ., , in, , 24. Classify the following values in JavaScript into suitable data type:, "Hello", False , 125.0, 148, "True", True, Ans. Number – 125.0, 128, String - “Hello”, “True”, Boolean – True, False, 25. What is Content Management System ? Write any two popular CMS software., Ans. Content Management System (CMS) refers to a web based software system which is, capable of creating, administering and publishing websites. CMS provides an easy way to, design and manage attractive websites. Popular CMS software are WordPress, Drupal and, Joomla, , Hs, sli, , 26. Define the following terms :, (i) Cardinality, (ii) Schema, (iii) Tuple, Ans. (i) The number of rows or tuples in a relation, (ii) The description or structure of a database. Include the name of a relation, name and, type of each column., (iii) A row or a record in a relation, 27. Explain any three benefits of ERP system., Ans. 1. Improved resource utilization: An enterprise can plan and manage its resources, effectively by installing ERP software, 2. Better customer satisfaction: Using an ERP system, a customer will get more attention and, service of an enterprise without spending more money and time, 3. Provides accurate information: ERP system will be able to provide high quality, relevant and, accurate information for the better future planning of the enterprise., Answer any 2 questions from 28 to 30. Each carries 5 scores, 28. Consider the following HTML code and answer the following:, <EM> COMPUTER </EM> <BR>, <STRONG> APPLICATION </STRONG> <BR>, <HR>, , [2 x 5 = 10 ]
Page 19 :
(a) Name the tag used to make the text as italics and bold in the above code., (1 mark), (b) What is the purpose of <HR> tag? Explain its any two attributes., (2 marks), (c) Write the HTML statement to scroll the text given in <EM> from top to bottom., (2 marks), , Hs, sli, , ve, ., , 29. Consider the following javascript code :, function print( ), {, var i;, for (i=1; i<=10 ; ++i), {, document .write ( i );, document .write (“<BR> ");, }, }, , in, , Ans. (a) <EM> tag is used to make the text italics, <STRONG> tag is used to make the text bold, (b) <HR> tag is used to create a horizontal ruler(line). The attributes of <HR> tag are :, size – To change the size of the line, width – To change the thickness of the line, noshade – To disable the shadow, color – To set the color of the line, align – To align the line to left, right or center, (c) <marquee direction=down> <EM> COMPUTER </EM> </marquee>, , (i) Write the output of the above code, (ii) Rewrite the above code using while loop, (iii) Modify the above code to find the sum of first 10 counting numbers, Ans., , (i) 1, 2, ......, 10, , ( Integers from 1 to 10 ), , (ii), function print(), {, var i;, i=1;, while(i<=10), {, document .write (i);, document .write (“<BR> ");, i=i+1;, }, }, , (1 mark), (2 marks), (2 marks)
Page 20 :
(iii) function print(), {, var i,s=0;, for (i=1; i<=10 ; ++i), {, s=s+i;, }, document.write(s);, }, , Hs, sli, , ve, ., , in, , 30. Define constraint. Explain any four column constraints., Ans. Constraints are the rules enforced on data that are entered into the column of a table., Column constraints are applied only to individual columns., i. NOT NULL, This constraint specifies that a column can never have NULL values, ii. AUTO_INCREMENT, MySQL uses the AUTO_INCREMENT keyword to perform an auto-increment feature. If, no value is specified for the column with AUTO_INCREMENT constraint, then MySQL will, assign serial numbers automatically and insert the newly assigned value in the corresponding, column of the new record., iii. UNIQUE, It ensures that no two rows have the same value in the column specified with this, constraint., iv. PRIMARY KEY, This constraint declares a column as the primary key of the table. A PRIMARY KEY, constraint is used to enforce a rule that a column should contain only unique, non- NULL data.
Page 21 :
March 2018, Part III, , Computer Applications, HSE II, , Maximum: 60 scores, , Answer all questions from 1 to 5. Each carries 1 score, , [5x1=5], , ve, ., , 2 Name the following tags :, (a) To include a button in HTML, (b) To partition the browser window, Ans. a)<input>, b)<frameset>, , in, , 1.Write a c+ + statement to declare an array with size 25 to accept the name of a student., Ans. char name[25];, , 3. Define Web Hosting., Ans. Web hosting is the service of providing storage space in a web server to serve files, for a website to be made available on the Internet., , Hs, sli, , 4. Define BPR., Ans. Business Process Reengineering, , 5. Name the intellectual property represented by the symbol®,©, Ans. Registered trade mark, copyright, Answer any 9 questions from 6 to 16. Each carries 2 scores, , [9x2=18], , 6. Define built-in function. Give two examples, Ans. C++ provides a rich collection of functions ready to be used for various tasks. Such, ready-to-use sub programs are called predefined functions or built-in functions, Eg: strlen(), islower(), 7. Write the use of the following in HTML :, 1 <A Href = ”www.dhsekerala.gov.in”>DHSE</A>, 2.<Embed src = ”song1.mp3”></Embed>, Ans.1.To open dhse website, 2.To include a song in the webpage, 8. Name the tag and attribute needed to create the flowing lists in HTML :, a), b), 1 RAM, 2 ROM, 3 HARD DISK, , §, §, §, , REGISTERS, CACHE, RAM
Page 22 :
Ans. a)<OL>, , b)<UL>, , 9. Write short note on free hosting., Ans. Free hosting provides web hosting services free of charge. The service provider displays, advertisements in the websites hosted to meet the expenses. The size of the files that can be, uploaded may be limited (supports upto 5 MB only), audio/video files (mp3, mp4, etc.) may not, be permitted and so on., , ve, ., , in, , 10. Write the type of web hosting that is most suitable :, (a) For hosting a school website wiith database, (b) For hosting a website for a firm, (c) For creating a blog to share pictures and posts, (d) For creating a low cost personal website with unique domain name, Ans, (a)Dedicated/Shared/VPS/Free hosting, (b)Dedicated/Shared/VPS/Free hosting, (b)Dedicated/Shared/VPS/Free hosting, (b)Dedicated/Shared/VPS, , Hs, sli, , 11. Define the following :, (a) Field, (b) Record, Ans. Field: A field is the smallest unit of stored data. Each field consists of data of a specific, type., a) Record: A record is a collection of related fields, 12. Write the names of any two column constraints and their usages., Ans. Default: To set a default value in a column ., Unique: No two rows have the same value for a column., 13. Define the following ERP related technologies :, (a) CRM, (b) SCM, Ans., a) CRM: Customer Relationship Management. CRM is a broadly used term that covers, policies used by an enterprise to manage their relationships with customers., b) SCM: Supply Chain Management. The supply chain consists of all the activities, associated with moving goods from the supplier to the customer, 14. Write short note on SAP., Ans: SAP stands for Systems, Applications and Products for data processing. It is a German, multinational software corporation founded in 1972. The company started by developing, software for integrated business solutions. In the beginning, the software was developed aiming, at large multinational companies., 15. Define the following terms :, (a) Trademark, (b) Copyright
Page 23 :
a) Trademark: A trademark is a distinctive sign that identifies certain goods or services, produced A trademark can be a name, logo, symbol, etc. that can be used to recognise a product, or service, b) Copyright: A copyright is a legal right given to the creators for an original work, usually for a, limited period of time. Copyright applies to a wide range of creative, intellectual or artistic, forms of works which include books, music, painting, sculpture, films, advertisement and, computer software., , ve, ., , in, , 16. Name the following :, (a) Satellite based Navigation system, (b)Service used to send messages with Multimedia content., (c) Packet oriented mobile data service on GSM, (d) Smart card technology used only in GSM phone Systems, Ans., a)GPS, b)MMS, c)GPRS, d)SIM, , Answer any 9 questions from 17 to 28. Each carries 3 Scores, , [9 x 3 = 27], , Hs, sli, , 17. Define Jump statements. Explain about any two, Ans. The statements that facilitate the transfer of program control from one place to another, are called jump statements. C++ provides four jump statements that perform unconditional, control transfer in a program. They are return, goto, break and continue statements., Break: it takes the program control outside the immediate enclosing loop. break is used in, loops as well as in switch statement., Continue: Takes the control outside the loop by skipping the remaining part of the loop., Continue statement is used only within loops, 18. Explain about nested loops, Ans. Placing a loop inside the body of another loop is called nesting of a loop. In a nested, loop, the inner loop statement will be executed repeatedly as long as the condition of the outer, loop is true. Here the loop control variables for the two loops should be different. All types of, loops in C++ allow nesting., Eg: for( i=1; i<=2; ++i), { for(j=1; j<=3; ++j), { cout<< "\n" << i << " and " << j;, }, }, Here first loop with variable I is the outer loop and the loop with loop variable j is the, inner loop., 19. Compare call-by-value and call-by-reference methods for calling functions., Ans.
Page 24 :
call-by-value, Ordinary variables are used as formal, parameters., Actual parameters may be constants,, variables or expressions, The changes made in the formal arguments, do not reflect in actual arguments., , call-by-reference, Reference variables are used as formal, parameters., Actual parameters will be variables only, The changes made in the formal arguments, do reflect in actual arguments, , ve, ., , in, , 20 Differentiate between local and global variables, Ans., Local Variables, Global variables, Declared within a function or a block of Declared outside all the functions., statements., Available only within that function or block., Available to all functions in the program., Memory is allocated when the function or Memory is allocated just before the execution, block is active and freed when the execution of the program and freed when the program, of the function or block is completed, stops execution., , Hs, sli, , 21. Name any two attributes of the following tags :, a)<HTML>, b)<MARQUEE>, c)<FONT>, Ans., a) Lang, dir, b) Direction, loop, c) size, color, , 22. Name the three essential tags for creating a table in HML . Write the purpose of each tag, Ans., <HTML>: - For Starting an HTML page. The entire HTML document is bounded by a, pair<HTML> of and </HTML>., <HEAD>:- For Creating head section . It contains the head of an HTML document, which, holds information about the document such as its title etc. The tag pair <HEAD>and </HEAD>, declares the head section., <BODY>:For Creating a body section. The body tag pair <BODY> and </BODY>, specifies the document body section. This section contains the content to be displayed in the, browser window. Hence, all other tags, which define the document content are given in the, body section., 23. Rewrite the following C++ code in JavaScript :, void length ( ), {, char str1;, Strl = "WELCOME" ;, cout <<”str1” ;, }, Ans:
Page 25 :
<script language=”JavaScript”>, function length(), {, var str1;, str1=”WELCOME”;, document.write(str1);, }, </script>, 24. Explain any three operators used in Relational algebra., Ans., 1.SELECT operation is used to select rows from a relation that satisfies a given predicate.., , in, , This operation is denoted using lower case letter sigma (σ ). The general format of select is as, follows:, , σ condition (Relation)., π A1, A2,…., An (Relation), , ve, ., , 2. The PROJECT operation selects certain attributes from the table and forms a new relation., It is denoted by lower case letter π . The general format of project operation is as follows:, 3. UNION operation is a binary operation and it returns a relation containing all tuples, appearing in either or both of the two specified relations. It is denoted by ., , Hs, sli, , 25. Explain any three advantages of DBMS., Ans., 1. Controlling data redundancy: Duplication of data is known as data redundancy. In, database systems all the data is kept at one place in a centralized manner., 2. Data consistency: Data redundancy may lead to data inconsistency; that is, the various, copies of the same data show different values in different files., 3. Data security: Data security refers to the protection of data against accidental or, intentional disclosure or unauthorized destruction or modification by unauthorized, persons. DBMS offers high security., 27.Define the following, 1 DML, 2DDL, 3.DCL, Ans., DDL is Data Definition Language that provides commands to deal with the structure, of RDBMS. The DDL commands are used to create, modify and remove the database, objects such as tables, views and keys. The common DDL commands are CREATE,, ALTER, and DROP., DML is Data Manipulation Language that provides user interaction with the database, system by providing a set of commands. DML permits users to insert data into tables,, retrieve existing data, delete data from tables and modify the stored data. The common DML, commands are SELECT, INSERT, UPDATE and DELETE., Data Control Language (DCL) is used to control access to the database, which is required, for security purpose of database. DCL includes commands that control a database. The, commands GRANT and REVOKE are DCL commands.
Page 26 :
27. Write the result of the following :, (a) ALTER TABLE <tablename>, Drop <column name>, (b) DELETE * FROM <tablename>, c)DROP TABLE<tablename>, Ans., a)Delete the column specified in the column name from the table, b)Error/Delete row from table, c)Delete the table itself, [2 x 5 = 10 ], , in, , Answer any 2 questions from 28 to30. Each carries 5 scores, , Hs, sli, , ve, ., , 28.Consider the following C++ code, int main( ), {, char str [20];, cout<<” "Enter a String" ;, cin >>str;, puts(str);, return 0;, }, a) Write the value of str if the string "HELLO WORLD', is input to the code. Justify., b) Write the amount of memory allocated for storing the array str. Give reason., c) Write an alternative we can use to input string in place of cout., Ans., a) HELLO. cin will accept input only up to whitespaces, b) 20.The size of the array is declared as 20., c) Error, 29.a) Differentiate client-side script and server-side script., b) Name the tag and its attribute used to include a script in a webpage, c)Name any two server-side scripting language, Ans. In client –side script, Script is copied to the client browser and is executed in the client, browser. In server side script ,Script remains in the web server and is executed in the, webserver, a) <Script>, Language, c)PHP,ASP, 30. In JavaScript :, (a) Explain any three types of operators used., (b) Describe any two datatypes used ., Ans., a) 1. Relational operators: Used for comparison. The relational operator in JavaScript are <,, <=, >, >=, = =, and !=, 2. Arithmetic operators: Used for arithmetic operations. +,-,*,/ are arithmetic operators
Page 27 :
Hs, sli, , ve, ., , in, , 3. String addition operator (+): used for concatenating two strings, b) Number: All numerical data are specified in number datatype. It consists of both integer, and decimal numbers, String: Any combination of characters, numbers or any other symbols, enclosed within, double quotes, are treated as a string in JavaScript.
Page 28 :
SAY 2017, Part III, , Computer Applications, HSE II, , Maximum: 60 scores, , 1. Identify the following C++ tokens :, (a) “Welcome”, (b) int, Ans. (a) String Literal (b) keyword, , (2 marks), (c) >=, (c) Operator, , (d) ++, (d) Operator, (1 mark), , in, , 2. ----------------- operator is the arithmetic assignment operator, Ans. +=, , Hs, sli, , ve, ., , 3. Explain break and continue statements with example, (3 marks), Ans. break statement - It transfers the program control outside the switch block. When a break, statement is encountered in a loop ( for , while , do-while ), it takes the program control outside, the immediate enclosing loop, For example,, i=1;, while(i<=10), {, cin>>num;, if (num = = 0 ), break;, cout<<"Entered number is: "<<num;, ++i;, }, cout<<"\nComes out of the loop";, continue statement - The statement continue is used for skipping over a part of the code within, the loop-body and forcing the next iteration., Eg., for (i=1; i<=10; ++i), {, if (i==6), continue;, cout<<i<<"\t";, }, 4. Explain how allocation of string take place in memory ?, (2 marks), Ans. String is considered as an array of characters. Each character in the string takes 1 byte, memory for storage. A string needs another 1 byte to represent end of the string as ‘\0’., OR, 5. Explain gets() and puts() functions., (2 marks), Ans. The function gets() is a console input function used to accept a string of characters, including white spaces from the standard input device (keyboard) and store it in a character, array.
Page 29 :
gets(character_array_name);, The function puts( ) is a console output function used to display a string data on the standard, output device (monitor). Its syntax is:, puts(string_data);, 6. Write a C++ program to enter 10 numbers into an array and find the second largest element., (5 marks), Ans., , Hs, sli, , ve, ., , in, , int main( ), {, int n, num[50], largest, second;, cout<<"Enter number of elements: ";, cin>>n;, for(int i=0; i<n; i++), {, cout<<"Enter Array Element"<<(i+1)<<": ";, cin>>num[i];, }, if(num[0]<num[1]), {, largest = num[1];, second = num[0];, }, else, {, largest = num[0];, second = num[1];, }, for (int i = 2; i< n ; i ++), {, if (num[i] > largest), {, second = largest;, largest = num[i];, }, else if (num[i] > second && num[i] < largest), {, second = num[i];, }, }, cout<<"Second Largest Element in array is: "<<second;, return 0;, }, OR
Page 30 :
ve, ., , in, , 7. Write a C++ program to convert all lowercase alphabets stored in a string to uppercase., (5 marks), Ans., int main ( ), {, char s[30];, int i;, cin>>s;, for(i=0;i<=strlen(s);i++), {, if(s[i]>=97 && s[i]<=122), {, s[i]=s[i]-32 ;, }, }, cout<<"The entered string in uppercase: "<<s;, return 0;, }, , Hs, sli, , 8. Explain three string functions in C++., (3 marks), Ans., i. strlen(), This function is used to find the length of a string., ii. strcpy(), This function is used to copy one string into another. The syntax of the function is:, iii. strcat(), This function is used to append one string to another string., 9. Write a program using a function to interchange the value of two variables. (Use call by, reference method for passing arguments), (3marks), Ans., #include <iostream>, using namespace std;, void swap(int & x, int & y);, {, int t = x;, x = y;, y = t;, }, int main(), {, int m, n;, m = 10;, n = 20;, cout<<"Before swapping m= "<< m <<" and n= "<<n;, swap(m, n);, cout<<"\nAfter swapping m= "<< m <<" and n= "<<n;, return 0;
Page 32 :
Ans. <HTML> <HEAD> <TITLE>MY FORM</TITLE> </HEAD>, <BODY>, <FORM name=”form1”> Name <INPUT type= ”text” name=”name”><BR>, Roll. No <INPUT type = ”text” name=”rollno”><BR>, Date of Birth, Month<SELECT name=”month”> <OPTION value=”1”>Jan</OPTION>, <OPTION value=”2”>Feb</OPTION> <OPTION value=”3”>Mar</OPTION> <OPTION, value=”4”>Apr</OPTION> <OPTION value=”5”>May</OPTION> <OPTION, value=”6”>Jun</OPTION> <OPTION value=”7”>Jul</OPTION> <OPTION, value=”8”>Aug</OPTION> <OPTION value=”9”>Sep</OPTION> <OPTION, value=”10”>Oct</OPTION> <OPTION value=”11”>Nov</OPTION> <OPTION, value=”12”>Dec</OPTION> </SELECT> Day<INPUT type=”text” name=”day”>, Year<INPUT type=”text” name=”year”> </FORM> </BODY> </HTML>, (1 mark), , (2 marks), , ve, ., , 18. Differentiate shared and dedicated web hosting, Ans., Shared hosting, , in, , 17. DNS stands for --------------------------Ans. Domain Name System, , Dedicated hosting, , Many different websites are stored The client leases the entire web server and all its, on one single web server, resources, Share resources like RAM and CPU The web server is not shared with any other website, , Hs, sli, , 19. Explain responsive web design., (3 marks), Ans. Responsive web design is the custom of building a website suitable to work on every, device and every screen size, no matter how large or small, mobile phone or desktop or, television., 20. ---------- is the symbol used for select operation in relational algebra, Ans. σ, , (1 mark), , 21. Explain advantages of DBMS over conventional file system., Ans., 1. Controlling data redundancy, 2. Data consistency, 3. Efficient data access, 4. Data integrity, 5. Data security, 6. Sharing of data, 7. Enforcement of standards, 8. Crash recovery, , (5 marks), , 22. ----------------- command in SQL is used to display the structure of a table., Ans. Describe, , (1 mark), , 23. Explain primary key constraint with an example, , (2 marks)
Page 33 :
Ans. A primary key is a set of one or more attributes that can uniquely identify tuples within the, relation. As it uniquely identifies each entity, it cannot contain null value and duplicate value., Example : Admission number, account number etc., 24. Write SQL for :, (3 marks), (a) Create a table student with the data [name char(20), rollno number(3), marks, number(3)]., (b) List name and rollno of all students, (c) List name and rollno of students having marks>600, Ans. (a) create table student(name cahr(20), rollno number(3), marks number(3));, (b) select name,rollno from student;, (c) select name,rollno from student where marks>600;, , (3 marks), , ve, ., , in, , OR, 25. An employee table contains name, empno, basicpay, desig., Write SQL statements for:, (a) Display name,empno and bascipayof all managers (desig=”manager”), (b) Display empno and salary of all employees, (salary=basicpay+da), (da=basicpay*1.15), (c) Display name and empno of all the employees whose basicpay<10000., , Hs, sli, , Ans. (a) select name,empno, basicpay from employee where desig=’manager’;, (b) UPDATE employee SET da = basicpay * 1.15;, UPDATE employee SET salary = basicpay + da;, select empno, salary from employee ;, (c) select name,empno from employee where basicpay<10000;, 26. List the benefits of ERP implementation in an enterprise., Ans., 1. Improved resource utilization, 2. Better customer satisfaction, 3. Provides accurate information, 4. Decision making capability, 5. Increased flexibility, 6. Information integrity, , (3 marks), , 27. SAP stands for -------------------- ., Ans. Systems, Applications and Products, , (1 mark), , 28. ----------------- is the popular mobile OS developed by Google based on Linux kernel, (1 mark), Ans. Android, 29. Differentiate GPS and EDGE., Ans., , (2 marks)
Page 34 :
GPS, , EDGE, , Satellite based navigation system to digital mobile phone technology that allows, locate a geographical position, improved data transmission rates for GSM, Used for tracking vehicles, aircrafts etc., , Superset to GPRS and can function on any, network with GPRS deployed on it, , 31. Pick the odd one out :, (a) KitKat, (c) Icecream Sandwitch, , in, , 30. Write a short note on IPR infringement., (3 marks), Ans. Unauthorised use of intellectual property rights such as patents, copyrights and trademarks, are called intellectual property infringement. It may be a violation of civil law or criminal law,, depending on the type of intellectual property, jurisdiction (countries) and the nature of the, action. Different types are patent infringement, copyright infringement, trademark infringement, , (b) Jelly Bean, (d) iOS, , Hs, sli, , ve, ., , Ans. iOS (all others are the versions of Android OS), , (1 mark)
Page 35 :
MARCH 2017, Part III, , Computer Applications, Maximum: 60 scores, , HSE II, , 1. Which among the following is equivalent to the statement series b=a, a=a+1., (a) b+=a, (b) b=a++, (c) b=++a, (d) b+ = a+b, Ans. b = a + +, , (1 mark), , ve, ., , 3. A 4G mobile network uses --------------., Ans. OFDMA, , in, , 2. A designed website has to be uploaded into a ------------ to make it available to the internet, users all over the world., (1 mark), Ans. Web server, (1 mark), , (1 mark), , 5. Rewrite the following C++ code using switch statement:, , (3 marks), , Hs, sli, , 4. Write the output of the following C++ code :, char s1=”Computer”;, char s2=”Applications”;, strcpy(s1,s2);, cout<<s2;, Ans. Applications, , cin>>pcode;, if ( pcode = = ’C’ ), cout<<”computer”;, else if (pcode = =’M’ ), cout<<”Mobile phone”;, else if ( pcode = =’L’ ), cout<<”Laptop”;, else, cout<<”Invalid code”;, Ans., cin>>pcode;, switch(pcode), {, case ‘C’: cout<<”Computer”; break ;, case ‘M’: cout<<”Mobile phone”; break ;, case ‘L’: cout<<”Laptop”; break ;, default: cout<<”invalid code”;, }
Page 36 :
6. Answer any one from 6(a) or 6(b)., 6 (a) Compare static and dynamic web pages, , (3 marks), , Ans., Static, Content and layout remain fixed, Doesn’t use database, Easy to develop, , Dynamic, Content and layout will change, Use database, Require Programming skill to develop, , 6 (b) Compare client side scripting and server side scripting languages, (3 marks), Server side scripting, , Script is copied to the client browser, , Script remains in the web server, , Script is executed in the client browser, , Script is executed in the web, , Users can block client side scripting, , Server side scripting cannot be blocked by a user, , ve, ., , in, , Ans., Client side scripting, , Hs, sli, , 7. Answer any one question from 7 (a) or 7(b)., 7 (a) Amita wanted to get the name ‘www.smartproducts.com’ for her newly designed web site., How is it possible?, (3 marks), Ans. 1. Buy a hosting space, 2. Domain name registration – Amita has to check whether this domain name is already, used by somebody else using www.whois.net site provided by ICANN. If the domain name is, available, then it can be registered., 7 (b) Ajith created a website using the software ‘Joomla’. What is the peculiarity of this, software and write any four advantages of using this software., (3 marks), Ans. Joomla is a popular Content Management System software., Advantages are:, It can be used to create, administer and publish web sites., Easy way to design and manage attractive web sites., Available for free download., 8. Is it possible to combine select and project operations of relational algebra into a single, statement? Explain with example., (2 marks), Ans. Yes. Select and project operations can be combined in a single statement., for, Higher, Eg. To select admission number and name of students who are Eligible, Studies., π admnno, name ( σ result="EHS" ( STUDENT )), 9. Write a short note on Android operating system., (2 marks), Ans. Android is a Linux-based operating system designed mainly for touch screen mobile, devices. It was originally developed by Android Inc. In 2005, Google acquired Android Inc.
Page 37 :
making it a wholly owned subsidiary of Google. The Android OS consists of a kernel based on, Linux kernel., 10. What is copyright? How does it differ from patent?, (3 marks), Ans. A copyright is a legal right given to the creators for an original work, usually for a limited, period of time. This covers rights for reproduction,, communication to the public, adaptation and translation of the work., A patent is the exclusive rights granted for an invention. It is the legal right obtained by an, inventor for exclusive control over the production and sale of his/her mechanical or scientific, invention for a limited period of time., , in, , 11. In RDBMS, a relation contains 10 rows and 5 columns. What is the degree of the relation?, (1 mark), Ans. 5, , ve, ., , 12. what is an external JavaScript file? Write the advantage of using an external JavaScript file?, (3 marks), Ans. We can place the scripts into an external file and then link to that file from within the, HTML document. This file is saved with the extension ‘.js’., Advantages :, 1. The script can be used in multiple HTML pages., 2. Separates HTML and the code, 3. Can speed up the page loading., , Hs, sli, , 13. Explain different levels of abstraction in DBMS., (3 marks), Ans. Physical level - The lowest level of abstraction describes how data is actually stored on, secondary storage devices such as disks and tapes. The physical level describes complex lowlevel data structures in detail., Logical level (conceptual level) - The next-higher level of abstraction describes what, data is stored in the database, and what relationships exist among those data., View level - View level is the highest level of database abstraction and is the closest to, the users. It is concerned with the way in which individual users view the data., 14. ---------------- is an SQL datatype which is used to represent variable length string. (1 mark), Ans. VARCHAR, 15. A ------------- statement in loop forces the termination of that loop., Ans. break, , (1 mark), , 16. ---------------------- is a server that acts as a bridge between merchant server and bank server., (1 mark), Ans. Payment gateway, 17. Write C++ initialisation statements to initialise an integer array name ‘MARK’ with the, values 70, 80, 85, 90., (1 mark), Ans. int MARK[4]={70,80,85,90};
Page 38 :
18. Write a C++ program to input 10 numbers into an integer array and find the sum of numbers, which are exact multiple of 5., (3 marks), Ans. int main( ), {, int number [ 10 ], i , s = 0 ;, cout<<” Enter 10 numbers:”;, for ( i = 0 ; i < 10 ; i ++ ), if ( number [ i ] % 5 = = 0 ), sum = sum + number [ i ] ;, cout<<” The sum is :”<<sum ;, return 0 ;, }, (2 marks), , ve, ., , in, , 19. Explain two stream functions for input operations with example., Ans. i. get() - Accept single or multi character through keyboard., Eg. cin.get(ch);, ii. getline() - Accepts a string through keyboard., Eg. cin.getline(str,10);, 20. The structure of the table employee is given below., Empcode numeric, empname string, basicpay, numeric, da, numeric, grosspay, numeric, , (5 marks), , Hs, sli, , Write SQL statement for the following :, (a) insert a record into the table, (b) update da with 60% basicpay, (c) display the details of employees whose basicpay is greater than 20000., (d) rename the table employee to empdetails, Ans. (a) insert into employee values(1005, ‘Vishnu’, 18000, null, null);, (b) update employee set da=basicpay*0.6;, (c) select * from employee where basicpay>20000;, (d) alter table employee rename to empdetails;, 21. Write the complete HTML tag that links the text “PSC” to the web site www.keralapsc.org., (1 mark), Ans. <a href=”www.keralapsc.org”>PSC</a>, 22. Explain nesting of framesets with an example., Ans. It is the process of inserting a frameset within another frameset., Eg. <frameset rows=” 30%,70% “ >, <frame src=”frame1.html”, <frameset cols=” 50%,50% “ >, <frame src=”frame2.html”>, <frame src=”frame3.html”>, </frameset>, , (3 marks)
Page 39 :
</frameset>, The above code will divide the browser window into 3 parts. Frame1.html is placed in the top, row. The second row is again divided into two columns and two files (frame2.html and, frame3.html) will be placed., , 24. Write HTML code to create the following table :, , Science, , (2 marks), , ve, ., , No of students, , in, , 23. Every web browser has default colours to display text and hyperlink. How we can change, these default colour., (2 marks), Ans. Text color can be changed by using the text attribute of <body> tag., Eg. <body text=”red”>, Link color can be changed by using the attributes link, alink, vlink., Link attribute specifies the color of unvisited link, alink attibute specifies the color of active link, vlink attribute specifies the color of visited link., , 55, , Commerce, , 60, , Humanities, , <th colspan=2>No of students</th>, </tr>, <td>Science</td>, <td>55</td> </tr>, <td>Commerce</td>, <td>60</td> </tr>, <td>Humanities</td>, <td>58</td> </tr>, , Hs, sli, , Ans. <table>, <tr>, <tr>, <tr>, <tr>, </table>, , 58, , 25. Answer any one question 25(a) or 25 (b)., (5 marks), (a) Explain the importance of BPR in ERP implementation., OR, (b) Selection of ERP package is very crucial in the implementation of ERP system. Give, a short note on any four ERP packages., Ans. (a) - It involves changes in structure and process of a business environment., - BPR which includes identification of business process, analysis of current business process,, designing of a revised process and implementation of revised process., - Business process re-engineering will help an enterprise to determine the changes in the, structure or process of a business for better aspects., - ERP and BPR are related and they go hand in hand, and in most of the cases business process, re engineering is performed before enterprise resource planning, - BPR and ERP are used together to achieve better result for the enterprise and to improve, existing ERP., (b) Popular ERP packages are Oracle, SAP, Odoo, Microsoft Dynamics, and Tally.
Page 40 :
26. Develop a webpage to display the following screen., , (3 marks), , ve, ., , Enter Name, , in, , Oracle - The ERP package from Oracle provides strong finance and accounting module., It also provides good customer and supplier interaction, effective production analysis, efficient, human resource management and better pricing module., SAP - SAP stands for Systems, Applications and Products for data processing. SAP also, developed Customer Relationship Management (CRM), Supply Chain Management (SCM),, and Product Life cycle Management (PLM) software., Odoo – Open source ERP package. Formerly known as Open ERP., Microsoft Dynamics - Microsoft Dynamics is part of Microsoft business solutions. It, provides a group of enterprise resource planning products primarily aimed at midsized, enterprises. This package can be installed and used easily and it provides good user interface., Tally ERP - Tally ERP is a business accounting software for accounting, inventory and, payroll., , SHOW, , Hs, sli, , The user can enter a name in the textbox. On clicking the show button, the name entered in the, textbox should be changed into uppercase. Include JavaScript code in the HTML for doing, this., Ans., <html>, <head>, <script language =” Javascript”>, function changecase ( ), {, var c = document.form1.text1.value ;, document.form1.text1.value = c.toUpperCase ( ) ;, }, </head>, <body>, <form name=”form1”>, Enter a name:, <Input type = “text” name = “text1”> <BR>, <Input type = “button” onClick = “changecase( )”>, </form>, </body>, </html>, 27. “Initialised formal arguments are called default arguments”. Using this concept write the, function prototype and definition of a user defined function sum ( ) which accepts two or three, integer numbers and return their sum., (3 marks)
Page 41 :
Hs, sli, , ve, ., , in, , Ans. prototype : int sum(int , int , int ) ;, definition:, int sum (int a , int b , int c), {, return a + b + c;, }
Page 42 :
CHAPTERWISE QUESTIONS AND ANSWERS, Chapter 1 - Review of C++ Programming, , ve, ., , in, , 1. Identify the four components of for loop-initialization expression, test expression, body of, the loop, update expression in the C++ code given below :, (Say 2019,2 marks), for(count=1 ; count< = N; count++), {, Sum=sum + count;, }, cout<<”sum=”<<sum;, Ans., 1.Initialisation Expression: count=1;, 2.Test Expression: count<=N;, 3.Body of the loop: sum = sum + count;, 4.update expression: count++;, , Hs, sli, , 2. What are the differences in string handling using cin and gets( ) in C++ programs?, Ans., (Say 2019,2 marks), cin, gets( ), cin cannot read white spaces, gets ( ) can read whitespaces, cin is an operator, gets ( ) is a function, 3. Compare break and continue statements in C++., (Say 2019,3 marks), Ans., Break, continue, it takes the program control outside the Takes the control outside the loop by, immediate enclosing loop, skipping the remaining part of the loop • ......., Program control goes outside only when the A continue statement will just abandon the, test expression of the loop returns false, current iteration and let the loop continue, with next iteration., break is used in loops as well as in decision Continue statement is used only within loops, statements such as switch statement, 4. Consider the following C++ code :, if (a = = 1), cout<<”Binary digit" ;, else if (a = = 0), cout<<"Binary digit";, else, cout<<”Not a binary digit";, , Rewrite the code using switch statement., Ans., switch(a), , (Say 2019,3 marks)
Page 43 :
{, case 1:, case 2:, default:, , cout<<”Binary digit”;, break;, cout<<”Binary digit”;, break;, cout<<”Not a binary digit";, , }, (March 2019,1 mark), , 6. List the type modifiers in C++., Ans., 1. Signed, 2. Unsigned, 3. Long, 4. short, , (March 2019,2 mark), , ve, ., , in, , 5.The input operator in C++ is _________, Ans. >> or get from or cin or extraction., , (March 2019,2 marks), , Hs, sli, , 7. Rewrite the following code using for loop :, int i = 1;, start :, cout << x;, x = x+5;, if(x<=50), go to start;, Ans., for(x=1; x<=50;x++), {, cout<<x;, }, , 8. Compare the selection statements 'if ' and 'switch'., (March 2019,3 marks), Ans., if, Switch, Can be used for any type cases or variables, Can be used for integers or character, constants, More flexible, Less flexible, Can be applied to check the range of values, Cannot be used to check range of values, 9. Rewrite the following C++ code using if else statement :, switch(choice), {, case 1: cout<<”one”;, break;, case 0: cout<<”zero”;, , (Say2018,3marks)
Page 44 :
break;, default: cout<<”end”;, break;, }, Ans., , ve, ., , in, , if (choice = =1), cout<<”one”;, else if(choice= =0), cout<<”zero”;, else, cout<<”end;, 10. Write the output of the following C++ code. Justify your answer. (Say2018,3marks), for(i=1;k=5;++i), {, cout<<”/t”<<i;, if(i= =3), break;, }, Ans. Question wrong, , Hs, sli, , 11. Define Jump statements. Explain about any two., (March2018,3marks), Ans. The statements that facilitate the transfer of program control from one place to another, are called jump statements. C++ provides four jump statements that perform unconditional, control transfer in a program. They are return, goto, break and continue statements., Break: it takes the program control outside the immediate enclosing loop. break is used in, loops as well as in switch statement., Continue: Takes the control outside the loop by skipping the remaining part of the loop., Continue statement is used only within loops, 12. Explain about nested loops., (March2018,3marks), Ans. Placing a loop inside the body of another loop is called nesting of a loop. In a nested, loop, the inner loop statement will be executed repeatedly as long as the condition of the outer, loop is true. Here the loop control variables for the two loops should be different. All types of, loops in C++ allow nesting., Eg: for( i=1; i<=2; ++i), { for(j=1; j<=3; ++j), { cout<< "\n" << i << " and " << j;, }, }, Here first loop with variable I is the outer loop and the loop with loop variable j is the, inner loop., 13. Identify the following C++ tokens :, (a) “Welcome”, (b) int, , (c) >=, , (d) ++, , Ans. (a) String Literal, , (c) Operator, , (d) Operator, , (b) keyword, , (Say2017,2 marks)
Page 45 :
14. ----------------- operator is the arithmetic assignment operator, Ans. +=, , (Say2017,1 mark), , ve, ., , in, , 15. Explain break and continue statements with example, (Say2017,3 marks), Ans. break statement - It transfers the program control outside the switch block. When a break, statement is encountered in a loop ( for , while , do-while ), it takes the program control outside, the immediate enclosing loop, For example,, i=1;, while(i<=10), {, cin>>num;, if (num = = 0 ), break;, cout<<"Entered number is: "<<num;, ++i;, }, cout<<"\nComes out of the loop";, , Hs, sli, , continue statement - The statement continue is used for skipping over a part of the code within, the loop-body and forcing the next iteration., Eg., for (i=1; i<=10; ++i), {, if (i==6), continue;, cout<<i<<"\t";, }, 16. Which among the following is equivalent to the statement series b=a, a=a+1., (a) b+=a, (b) b=a++, (March2017,1 mark), (c) b=++a, Ans. b = a + +, , (d) b+ = a+b, , 17. Write the output of the following C++ code :, char s1=”Computer”;, char s2=”Applications”;, strcpy(s1,s2);, cout<<s2;, Ans. Applications, , (March2017,1 mark), , 18. Rewrite the following C++ code using switch statement:, , (March2017,3 marks), , cin>>pcode;, if ( pcode = = ’C’ ), cout<<”computer”;, else if (pcode = =’M’ )
Page 46 :
in, , cout<<”Mobile phone”;, else if ( pcode = =’L’ ), cout<<”Laptop”;, else, cout<<”Invalid code”;, Ans., cin>>pcode;, switch(pcode), {, case ‘C’: cout<<”Computer”; break ;, case ‘M’: cout<<”Mobile phone”; break ;, case ‘L’: cout<<”Laptop”; break ;, default: cout<<”invalid code”;, }, , ve, ., , 19. A ------------- statement in loop forces the termination of that loop. (March2017,1 mark), Ans. break, , Chapter 2 - Arrays, , Hs, sli, , 1.Accessing each element of an array at least once to perform any operation is known as, ------------- operation., (Say 2019,1 mark), Ans. Traversal, 2. (a) Define an array., (Say 2019,3 marks), (b) Write C++ statement to declare a character array of size20., (c) Write C++ statement to store the string "Welcome" in the same array., Ans. An array is a collection of elements of the same type placed in contiguous memory, location under a same variable name, char name[20];, char str[ ] = ”welcome”;, 3. ____ character is stored at the end of the string., Ans. ‘\0’ or NULL, , (March 2019,1 mark), , 4. i) Define an Array., (March 2019,2 marks), (ii) Initialize an integer array with 5 elements., Ans., 1) Array is a collection of elements of same datatype stored in continuous memory under a, common name., int arr[5]={1,2,3,4,5};, 5. Write a program in C++ to accept a string with white space like "good morning" from the, keyboard and display the same., (March 2019,3 marks)
Page 47 :
Ans., #include<iostream>, #include<cstdio>, int main(), {, char str1[25];, cout<<”Enter a string”;, gets(str1);, puts(str1);, }, 6. Consider the following C++ code :, , (Say2018,3marks), , in, , (a) char name[20];, cin>>name;, cout<<name;, , Hs, sli, , ve, ., , (b) char name[20];, gets(name);, cout<<name;, Write the answers in both cases if the string entered value is “NEW DELHI”. Justify your, answer., Ans. In the code (a), the answer will be “NEW” because the cin operator will not consider the, string after white space., In the code (b), the answer will be “NEW DELHI” because the gets() function will, accept strings with white spaces., 7. Define array traversal with an example., (Say2018,3marks), Ans. Accessing each element of an array at least once to perform any operation is known as, traversal operation. Displaying all the elements of an array is an example of traversal., E. g., #include <iostream>, using namespace std;, int main(), {, int a[5], i;, cout<<"Enter the elements of the array :";, for(i=0; i<5; i++), cin >> a[i];, //Reading the elements, for(i=0; i<5; i++), a[i] = a[i] + 1;, // A case of traversal, cout<<"\nNow value of elements in the array are...\n";, for(i=0; i<5; i++), cout<< a[i]<< "\t";, // Another case of traversal, return 0;, }, 8.Write a c+ + statement to declare an array with size 25 to accept the name of a student.
Page 48 :
Ans. char name[25];, , (March2018,1mark), , ve, ., , in, , 9.Consider the following C++ code., (March2018,5marks), int main( ), {, char str [20];, cout<<” "Enter a String" ;, cin >>str;, puts(str);, return 0;, }, a) Write the value of str if the string "HELLO WORLD', is input to the code. Justify., b) Write the amount of memory allocated for storing the array str. Give reason., c) Write an alternative we can use to input string in place of cout., Ans., a) HELLO. cin will accept input only up to whitespaces, b) 20.The size of the array is declared as 20., c) Error, , Hs, sli, , 10. Explain how allocation of string take place in memory ?, (Say2017,2 marks), Ans. String is considered as an array of characters. Each character in the string takes 1 byte, memory for storage. A string needs another 1 byte to represent end of the string as ‘\0’., OR, 11. Explain gets() and puts() functions., (Say2017,2 marks), Ans. The function gets() is a console input function used to accept a string of characters, including white spaces from the standard input device (keyboard) and store it in a character, array., gets(character_array_name);, The function puts( ) is a console output function used to display a string data on the standard, output device (monitor). Its syntax is:, puts(string_data);, 12. Write a C++ program to enter 10 numbers into an array and find the second largest element., (Say2017,5 marks), Ans., int main( ), {, int n, num[50], largest, second;, cout<<"Enter number of elements: ";, cin>>n;, for(int i=0; i<n; i++), {, cout<<"Enter Array Element"<<(i+1)<<": ";, cin>>num[i];, }, if(num[0]<num[1])
Page 49 :
{, , }, , ve, ., , in, , largest = num[1];, second = num[0];, }, else, {, largest = num[0];, second = num[1];, }, for (int i = 2; i< n ; i ++), {, if (num[i] > largest), {, second = largest;, largest = num[i];, }, else if (num[i] > second && num[i] < largest), {, second = num[i];, }, }, cout<<"Second Largest Element in array is: "<<second;, return 0;, , Hs, sli, , OR, 13. Write a C++ program to convert all lowercase alphabets stored in a string to uppercase., (Say2017,5 marks), Ans., int main ( ), {, char s[30];, int i;, cin>>s;, for(i=0;i<=strlen(s);i++), {, if(s[i]>=97 && s[i]<=122), {, s[i]=s[i]-32 ;, }, }, cout<<"The entered string in uppercase: "<<s;, return 0;, }, 14. Write C++ initialisation statements to initialise an integer array name ‘MARK’ with the, values 70, 80, 85, 90., (March2017,1 mark)
Page 50 :
Ans. int MARK[4]={70,80,85,90};, , ve, ., , in, , 15. Write a C++ program to input 10 numbers into an integer array and find the sum of numbers, which are exact multiple of 5., (March2017,3 marks), Ans. int main( ), {, int number [ 10 ], i , s = 0 ;, cout<<” Enter 10 numbers:”;, for ( i = 0 ; i < 10 ; i ++ ), if ( number [ i ] % 5 = = 0 ), sum = sum + number [ i ] ;, cout<<” The sum is :”<<sum ;, return 0 ;, }, , Chapter 3 – Functions, , Hs, sli, , 1.Name the Mathematical function which returns the absolute value of an integer number., Ans. abs(), (Say 2019,1 mark), 2. Explain any two built-in functions in C++ that are used for string manipulation., Ans. 1. strcpy() This function is used to copy one string into another. The syntax of the function, is: strcpy(string1, string2); The function will copy string2 to string1. (Say 2019,2 marks), 2. strcat() This function is used to append one string to another string. The length of the, resultant string is the total length of the two strings. The syntax of the functions is:, strcat(string1, string2); Here string1 and string2 are array of characters or string, constants. string2 is appended to string1., 3. (a) Define Modular Programming., (Say 2019,3 marks), (b) Explain the merits of Modular programming, Ans. (a ) In programming, the entire problem will be divided into small sub problems that, can be solved by writing separate programs. This kind of approach is known as modular, programming. Each sub task will be considered as a module and we write programs for each, module. The process of breaking large programs into smaller sub programs is called, modularization., ( b ) Merits of Modular Programming, 1.Reduces the size of the program, 2. Less chance of error occurrence, 3. Reduces programming complexity:, 4. Improves reusability, 4. The process of breaking large program into smaller sub - programs is called ______, Ans. Modularity, (March 2019,1 mark), 5. Identify the built in C++ function for the following cases :, (i) to convert -25 to25., (ii) compare ‘computer’ and ‘COMPUTER’ ignoring cases., , (March 2019,5 marks)
Page 51 :
(iii) to check the given character is digit or not., (iv) to convert the character From ‘B’ to ’b’., (v) to find the square root of 64 or a number., Ans., i), abs()., ii), strcmpi()., ii), isdigit()., iv), tolower()., vi) sqrt()., 6. Write the name of built in function of C++ to convert given character into lower case., Ans. tolower ( ), (Say2018,1 mark), , ve, ., , in, , 7. Write the function prototypes for the following function:, (Say2018,2marks), (i) A function sum() takes two integer arguments and return integer value., (ii) A function print() has no arguments and no return value., Ans., (i) int sum(int,int);, (ii) void print();, 8. Differentiate actual arguments and formal arguments in C++., (Say2018,2marks), Ans. The variables used in the function definition as arguments are known as formal arguments., The constants, variables or expressions used in the function call are known as actual (original), arguments., , Hs, sli, , 9. Consider the following function definition in C++ :, (Say2018,3marks), void sum(int a, int b=10, int c=20), {, int sum=a+b+c;, cout<<sum;, }, Write the output of the following function call :, (a) sum(1,2,3);, (b) sum(2,3);, (c) sum(3);, Ans. (a) 6 (1+2+3), (b) 25 (2+3+20), (c) 33 (3+10+20), 10. Define built-in function. Give two examples, (March2018,2marks), Ans. C++ provides a rich collection of functions ready to be used for various tasks. Such, ready-to-use sub programs are called predefined functions or built-in functions, Eg: strlen(), islower(), 12. Compare call-by-value and call-by-reference methods for calling functions., Ans., (March2018,3marks)
Page 52 :
call-by-value, Ordinary variables are used as formal, parameters., Actual parameters may be constants,, variables or expressions, The changes made in the formal arguments, do not reflect in actual arguments., , call-by-reference, Reference variables are used as formal, parameters., Actual parameters will be variables only, The changes made in the formal arguments, do reflect in actual arguments, , ve, ., , in, , 13. Differentiate between local and global variables., (March2018,3marks), Ans., Local Variables, Global variables, Declared within a function or a block of Declared outside all the functions., statements., Available only within that function or block., Available to all functions in the program., Memory is allocated when the function or Memory is allocated just before the execution, block is active and freed when the execution of the program and freed when the program, of the function or block is completed, stops execution., , Hs, sli, , 14. Explain three string functions in C++., (Say2017,3 marks), Ans., i. strlen(), This function is used to find the length of a string., ii. strcpy(), This function is used to copy one string into another. The syntax of the function is:, iii. strcat(), This function is used to append one string to another string., 15. Write a program using a function to interchange the value of two variables. (Use call by, reference method for passing arguments), (Say2017,3marks) Ans., #include <iostream>, using namespace std;, void swap(int & x, int & y);, {, int t = x;, x = y;, y = t;, }, int main(), {, int m, n;, m = 10;, n = 20;, cout<<"Before swapping m= "<< m <<" and n= "<<n;, swap(m, n);, cout<<"\nAfter swapping m= "<< m <<" and n= "<<n;, return 0;, }
Page 53 :
16. char s1[10]=”hello”, s2[10];, strcpy(s2,s1);, cout<<s2;, What will be the output ?, Ans. hello, , (Say2017,1 mark), , 17. Explain two stream functions for input operations with example., Ans. i. get() - Accept single or multi character through keyboard., Eg. cin.get(ch);, ii. getline() - Accepts a string through keyboard., Eg. cin.getline(str,10);, , (March2017,2 marks), , Hs, sli, , ve, ., , in, , 18. “Initialised formal arguments are called default arguments”. Using this concept write the, function prototype and definition of a user defined function sum ( ) which accepts two or three, integer numbers and return their sum., (March2017,3 marks), Ans. prototype : int sum(int , int , int ) ;, definition:, int sum (int a , int b , int c), {, return a + b + c;, }, , Chapter 4 - Web Technology, , 1. Write HTML tags used to insert comments in HTML web pages., Ans. To insert comments, use <!-- and -->, (Say 2019,2 marks), 2. Suppose you are browsing the website www.keralapsc.gov.in: Explain how DNS resolves the, IP address, (Say 2019,3 marks), Ans., 1. All browsers store the IP addresses of the recently visited websites in its cache. Therefore,, the browser first searches its local memory to see whether it has the IP address, www.keralapsc.gov.in If found, the browser uses it, 2. If it is not found in the browser cache, it checks the operating system's local cache for the, IP address., 3. If it is not found there, it searches the DNS server of the local ISP., 4. In the absence of the domain name in the ISP's DNS server, the ISP's DNS server, initiates a recursive search starting from the root server till it receives the IP address., 5. The ISP's DNS server returns this IP address to the browser., 6. The browser connects to the web server using the IP address of www.keralapsc.gov.in, and the webpage is displayed in the browser window. If the IP address is not found, it, returns the message 'Server not found' in the browser window, 3. Write HTML code to display the following :, , (Say 2019,3 marks)
Page 54 :
(a) (a+b)2 = a2 + 2ab + b2, (b) © Department of Education, Ans., (a) (a+b)<sup>2</sup>=a<sup>2</sup>+2ab+b<sup>2</sup>, (b) © Department of Education, (March 2019,2 marks), , 5. Compare static webpage and dynamic webpage., Ans., , (March 2019,3 marks), , Dynamic, Content and layout will change, Use database, Require Programming skill to develop, , ve, ., , Static, Content and layout remain fixed, Doesn’t use database, Easy to develop, , in, , 4.Write the port number for the following web services :, (i) Simple Mail Transfer protocol, (ii) HTTP secure (HTTPS), Ans:, i), 25, ii), 443, , Hs, sli, , (March 2019,3 marks), 6. (i) What is the use of reserved characters for HTML entities?, (ii) List any four reserved characters and its use., Ans., i) In HTML, the symbols like <, &, etc. have special meaning and cannot be used in the, HTML documents as part of the text content. The browser treats these symbols as the, punctuation marks of HTML words like tags and entities. These Symbols are displayed as, HTML entities., ii) < < Less than, > > Greater than, © © - Copyright Symbol, ™ &trade - Trademark Symbol, 7. Which is the tag used to create a line break in HTML page., (Say2018,1 mark), Ans. <br>, 8. Write the output of the following html code:, <ol type=1 start=10>, <li>keyboard</li>, <li>mouse</li>, <li>light pen</li>, </ol>, Ans., 10. keyboard, 11. mouse, 12. light pen, , 9. Compare client side scripting and server side scripting, Ans., , (Say2018,2marks), , (Say2018,3marks)
Page 55 :
Client side scripting, , Server side scripting, , Script is copied to the client browser, , Script remains in the web server, , Script is executed in the client browser, , Script is executed in the web server, , Client side scripts are mainly used for, validation of data., , Server side scripts are usually used to connect to, databases and return data from the web server, , 10. Consider the following HTML code and answer the following:, , (Say2018,5marks), , in, , <EM> COMPUTER </EM> <BR>, <STRONG> APPLICATION </STRONG> <BR>, <HR>, , ve, ., , (a) Name the tag used to make the text as italics and bold in the above code., (1 mark), (b) What is the purpose of <HR> tag? Explain its any two attributes., (2 marks), (c) Write the HTML statement to scroll the text given in <EM> from top to bottom., (2 marks), , Hs, sli, , Ans. (a) <EM> tag is used to make the text italics, <STRONG> tag is used to make the text bold, (b) <HR> tag is used to create a horizontal ruler(line). The attributes of <HR> tag are :, size – To change the size of the line, width – To change the thickness of the line, noshade – To disable the shadow, color – To set the color of the line, align – To align the line to left, right or center, (c) <marquee direction=down> <EM> COMPUTER </EM> </marquee>, 11. Name any two attributes of the following tags :, (March2018,3marks), a)<HTML>, b)<MARQUEE>, c)<FONT>, Ans., a) Lang, dir, b) Direction, loop, c) size, color, 12. Name the three essential tags for creating a table in HML . Write the purpose of each tag, Ans., (March2018,3marks), <HTML>: - For Starting an HTML page. The entire HTML document is bounded by a, pair<HTML> of and </HTML>., <HEAD>:- For Creating head section . It contains the head of an HTML document, which, holds information about the document such as its title etc. The tag pair <HEAD>and </HEAD>, declares the head section., <BODY>:For Creating a body section. The body tag pair <BODY> and </BODY>, specifies the document body section. This section contains the content to be displayed in the, browser window. Hence, all other tags, which define the document content are given in the, body section.
Page 56 :
13.a) Differentiate client-side script and server-side script., (March2018,5marks), b) Name the tag and its attribute used to include a script in a webpage, c)Name any two server-side scripting language, Ans. In client –side script, Script is copied to the client browser and is executed in the client, browser. In server side script ,Script remains in the web server and is executed in the, webserver, a) <Script>, Language, c)PHP,ASP, 14. The port number for HTTP protocol is ---------Ans. 80, , (Say2017,1 mark), , 16. Pick the odd one out :, (a) BODY, (b) HTML, Ans. ALIGN (all others are tags), , ve, ., , in, , 15. Differentiate static and dynamic web page., (Say2017,2 marks), Ans., Static, Dynamic, Content and layout remain fixed, Content and layout will change, Doesn’t use database, Use database, Easy to develop, Require Programming skill to develop, , (c) HEAD, , (Say2017,1 mark), (d) ALIGN, , Hs, sli, , 2. A designed website has to be uploaded into a ------------ to make it available to the internet, users all over the world., (March2017,1 mark), Ans. Web server, 17. ---------------------- is a server that acts as a bridge between merchant server and bank server., (March2017,1 mark), Ans. Payment gateway, 18. Every web browser has default colours to display text and hyperlink. How we can change, these default colour., (March2017,2 marks), Ans. Text color can be changed by using the text attribute of <body> tag., Eg. <body text=”red”>, Link color can be changed by using the attributes link, alink, vlink., Link attribute specifies the color of unvisited link, alink attibute specifies the color of active link, vlink attribute specifies the color of visited link.
Page 57 :
Chapter 5 - Web Designing Using HTML, 1. What is the use of <frameset >tag in HTML? List any two attributes of this tag, Ans. <frameset> tag is used to divide a web page into different windows. Two attributes of, <frameset> tag are:, (Say 2019,2 marks), 1. cols: This attribute determines the number and dimensions of vertical frames, 2. rows: This attribute determines the number and dimensions of horizontal frames, , in, , 2. Differentiate cellspacing and cellpadding., (Say 2019,2 marks), Ans. Cellspacing attributes specifies determines the space to the left between cells., Cellpadding is the space between the content and cell border. We can increase and decrease, both cellspacing and cellpadding., , ve, ., , 3. Write any two method to include scripts in the HTML document. (Say 2019,2 marks), Ans. Two methods to include scripts in HTML document are:, 1) Inside <head> - As the body section of the HTML page contains large volume of text,, this is said to be the best practice. This avoids the confusion of web designer., 2) As an external file with explanations – Here, the script file is linked to the HTML file, as an external file., , Hs, sli, , 4. Describe any four values of type attributes of the <input> tag in html., Ans. type=text – To create a textbox, (Say2018,2 marks), type=password – To create a password box, type=radio – to create a radio button, type=checkbox – to create a check box, , 5. (a) Explain any two types of lists in HTML, (b) Write HTML code to display the following list :, , (Say 2019,5 marks), , Memory Devices, V. Registers, VI. Cache, VII. RAM, VIII. Hard Disk, , Ans., (a) Two types of Lists in HTML:, 1.Unordered list: Unordered lists or bulleted lists display a bullet or other graphic in front of, each item in the list. We can create an unordered list with the tag pair<ul> and </ul>. Each item, in the list is presented by using the tag pair <li> and</li>, 2.Ordered List: Ordered lists present the items in some numerical or alphabetical order., HTML provides the tag pair <ol>and </ol>to create an ordered list. The items in the ordered list, are presented by <Li> and </Li>. The ordered list is also called numbered list., b) <body>
Page 58 :
<center>, Memory Devices, <ol type = ”I” start=”5”>, <LI> Registers</LI>, <LI> cache</LI>, <LI> RAM</LI>, <LI> Harddisk</LI>, </ol>, </center></body>, , in, , 6. What is the use of frame tag in HTML ? What is its limitation ?, (March 2019,2 marks), Ans., Frame tag is used to specify the name of HTML page which is to be loaded in the frame, created by frameset tag. Limitation of frame tag is that earlier browsers did not support frames., (March 2019,2 marks), , Hs, sli, , ve, ., , 11. Write the HTML code to display the following using list tag :, (i) Biology Science, (ii) Commerce, (iii) Humanities, Ans., <Body>, <OL type=”i”>, <LI> Biology Science</LI>, <LI> Commerce</LI>, <LI> Humanities</LI>, </OL>, </Body>, , 7. (i). Write the name of tag used to group related data in an HTML form., ii). Write the HTML code to display the following web page :, (March 2019,5 marks), Username, Password, , Submit, , Reset, , Ans., i), <fieldset>, ii), <Body>, <form>, Username <input type=”text” >, Password <input type=”password”>, <input type=”submit” value=”submit”>, <input type=”reset” value=”reset”>
Page 61 :
<tr> <td>Commerce</td>, <tr> <td>Humanities</td>, </table>, , <td>60</td> </tr>, <td>58</td> </tr>, , Chapter 6 – Client Side Scripting Using JavaScript, , ok, , ve, ., , Welcome to java script, , in, , 1. ------------ is a JavaScript function used to include a text in the body section of a webpage, Ans. document.write(), (Say 2019,1 mark), 2. Write any three built-in functions in JavaScript and explain its use., Ans., (Say 2019,3 marks), a. alert() function: This function is used to display a message on the screen. For example,, the statement alert(“Welcome to JavaScript”); will display the following message, window on the browser window, , b. isNaN() function: This function is used to check whether a value is a number or not. In, this function, NaN stands for Not a Number., c. toUpperCase( ) function: This function returns the upper case form of the given string, , Hs, sli, , 3. Name the keyword used to declare variable in JavaScript., Ans. var, , (March 2019,1 mark), , 4. What is the difference between isNaN( ) and Number( ) functions in JavaScript ?, Ans:, (March 2019,2 marks), isNaN(): Built in function used to check whether a given argument is not a number., Number(): Function used to convert the given character to number, 5. Write the built in functions in JavaScript used for the following situations, i) Display warning message in the screen, (March 2019,3 marks), ii) character at a particular position, iii) convert uppercase to lowercase, Ans., i), alert()., ii), charAt()., iii) toUpperCase()., 6. Classify the following values in JavaScript into suitable data type: (Say2018,3marks), "Hello", False , 125.0, 148, "True", True, Ans. Number – 125.0, 128, String - “Hello”, “True”, Boolean – True, False, 7. Consider the following JavaScript code :, (Say2018,3marks)
Page 62 :
function print( ), {, var i;, for (i=1; i<=10 ; ++i), {, document .write ( i );, document .write (“<BR> ");, }, }, , ve, ., , Ans., (i) 1, 2, ......, 10, , (1 mark), (2 marks), (2 marks), , in, , (i) Write the output of the above code, (ii) Rewrite the above code using while loop, (iii) Modify the above code to find the sum of first 10 counting numbers, , ( Integers from 1 to 10 ), , Hs, sli, , (ii), function print(), {, var i;, i=1;, while(i<=10), {, document .write (i);, document .write (“<BR> ");, i=i+1;, }, }, (iii) function print(), {, var i,s=0;, for (i=1; i<=10 ; ++i), {, s=s+i;, }, document.write(s);, }, , 8. Rewrite the following C++ code in JavaScript :, void length ( ), , (March2018,3marks)
Page 63 :
{, , in, , char str1;, Strl = "WELCOME" ;, cout <<”str1” ;, }, Ans:, <script language=”JavaScript”>, function length(), {, var str1;, str1=”WELCOME”;, document.write(str1);, }, </script>, , Hs, sli, , ve, ., , 9. In JavaScript :, (a) Explain any three types of operators used., (March2018,5marks), (b) Describe any two datatypes used ., Ans., a) 1. Relational operators: Used for comparison. The relational operator in JavaScript are <,, <=, >, >=, = =, and !=, 2. Arithmetic operators: Used for arithmetic operations. +,-,*,/ are arithmetic operators, 3. String addition operator (+): used for concatenating two strings, b) Number: All numerical data are specified in number datatype. It consists of both integer, and decimal numbers, String: Any combination of characters, numbers or any other symbols, enclosed within, double quotes, are treated as a string in JavaScript., 10. Write a JavaScript program which inputs the name, rollno and date_of_birth of a student., Date of birth contains month, day and year. Month should be selected from a drop down list., (Say2017,3 marks), Ans. <HTML> <HEAD> <TITLE>MY FORM</TITLE> </HEAD>, <BODY>, <FORM name=”form1”> Name <INPUT type= ”text” name=”name”><BR>, Roll. No <INPUT type = ”text” name=”rollno”><BR>, Date of Birth, Month<SELECT name=”month”> <OPTION value=”1”>Jan</OPTION>, <OPTION value=”2”>Feb</OPTION> <OPTION value=”3”>Mar</OPTION> <OPTION, value=”4”>Apr</OPTION> <OPTION value=”5”>May</OPTION> <OPTION, value=”6”>Jun</OPTION> <OPTION value=”7”>Jul</OPTION> <OPTION, value=”8”>Aug</OPTION> <OPTION value=”9”>Sep</OPTION> <OPTION, value=”10”>Oct</OPTION> <OPTION value=”11”>Nov</OPTION> <OPTION, value=”12”>Dec</OPTION> </SELECT> Day<INPUT type=”text” name=”day”>, Year<INPUT type=”text” name=”year”> </FORM> </BODY> </HTML>, 11. Answer any one from 11(a) or 11(b)., 11 (a) Compare static and dynamic web pages, Ans., , (March2017,3 marks)
Page 64 :
Static, Content and layout remain fixed, Doesn’t use database, Easy to develop, , Dynamic, Content and layout will change, Use database, Require Programming skill to develop, , 11 (b) Compare client side scripting and server side scripting languages, (March2017,3 marks), Ans., Client side scripting, Server side scripting, Script remains in the web server, , Script is executed in the client browser, , Script is executed in the web, , Users can block client side scripting, , Server side scripting cannot be blocked by a user, , in, , Script is copied to the client browser, , ve, ., , 12. what is an external JavaScript file? Write the advantage of using an external JavaScript file?, (March2017,3 marks), Ans. We can place the scripts into an external file and then link to that file from within the, HTML document. This file is saved with the extension ‘.js’., Advantages :, 1. The script can be used in multiple HTML pages., 2. Separates HTML and the code, 3. Can speed up the page loading., , Hs, sli, , 13. Develop a webpage to display the following screen., , (March2017,3 marks), , Enter Name, , SHOW, , The user can enter a name in the textbox. On clicking the show button, the name entered in the, textbox should be changed into uppercase. Include JavaScript code in the HTML for doing, this., Ans., <html>, <head>, <script language =” Javascript”>, function changecase ( ), {, var c = document.form1.text1.value ;, document.form1.text1.value = c.toUpperCase ( ) ;, }, </head>, <body>
Page 65 :
<form name=”form1”>, Enter a name:, <Input type = “text” name = “text1”> <BR>, <Input type = “button” onClick = “changecase( )”>, </form>, </body>, </html>, , Chapter 7 – Web Hosting, , in, , 1. Write short notes on responsive web design., (Say 2019,2 marks), Ans. Responsive web design is the custom of building a website suitable to work on every, device, and every screen size, no matter how large or small, mobile phone or desktop or, television., , ve, ., , 2. Briefly explain different types of web hosting, (Say 2019,3 marks), Ans. Three types of web hosting:, 1.Shared hosting: In shared hosting many different websites are stored on one single web, server and they share resources like RAM and CPU. Shared hosting is most suitable for small, websites that have less traffic. Shared servers are cheaper and easy to use., , Hs, sli, , 3. Dedicated hosting: Dedicated web hosting is the hosting where the client leases the entire, web server and all its resources. The web server is not shared with any other website. Websites, of large organisations, government departments, etc. where there are large numbers of visitors,, opt for dedicated web hosting., 4. Virtual Private Server: A Virtual Private Server (VPS) is a physical server that is virtually, partitioned into several servers using the virtualization technology. Each VPS works similar to a, dedicated server and has its own separate server operating system, web server software and, packages like e-mail, databases, etc. installed in it., 5. What is CMS ? Give two examples, (March 2019,2 marks), Ans., Content Management System (CMS) refers to a web based software system which is, capable of creating, administering and publishing websites. CMS provides an easy way to, design and manage attractive websites., Eg: Jhoomla, drupal, 6. Write the merits and demerits of free webhosting., (March 2019,3 marks), Ans., Merits: Free hosting provides web hosting services free of charge. Some free web hosting, companies provide domain name registration services also. Free web hosting is useful for, sharing content on the web, among groups having similar interests like family unions,, non-profit organisations, etc. who are not able to spend money on web hosting.
Page 66 :
Demerits: The service provider displays advertisements in the websites hosted to meet, the expenses. The size of the files that can be uploaded may be limited (supports upto 5, MB only), audio/video files (mp3, mp4, etc.) may not be permitted and so on, 7. Write short note on Virtual Private Server., (Say2018,2marks), Ans. A Virtual Private Server (VPS) is a physical server that is virtually partitioned into several, servers using the virtualization technology. Each VPS works similar to a dedicated server and, has its own separate server operating system, web server software and packages like e-mail,, databases, etc. installed in it., , in, , 8. What is Content Management System ? Write any two popular CMS software., Ans. Content Management System (CMS) refers to a web based software system which is, capable of creating, administering and publishing websites. CMS provides an easy way to, design and manage attractive websites. Popular CMS software are WordPress, Drupal and, Joomla., (Say2018,3marks), , ve, ., , 9. Define Web Hosting., (March2018,1mark), Ans. Web hosting is the service of providing storage space in a web server to serve files, for a website to be made available on the Internet., 10. Write short note on free hosting., (March2018,2marks), Ans. Free hosting provides web hosting services free of charge. The service provider displays, advertisements in the websites hosted to meet the expenses. The size of the files that can be, uploaded may be limited (supports upto 5 MB only), audio/video files (mp3, mp4, etc.) may not, be permitted and so on., , Hs, sli, , 11. Write the type of web hosting that is most suitable :, (March2018,2marks), (a) For hosting a school website wiith database, (b) For hosting a website for a firm, (c) For creating a blog to share pictures and posts, (d) For creating a low cost personal website with unique domain name, Ans., (a)Dedicated/Shared/VPS/Free hosting, (b)Dedicated/Shared/VPS/Free hosting, (b)Dedicated/Shared/VPS/Free hosting, (b)Dedicated/Shared/VPS, 12. DNS stands for --------------------------(Say2017,1 mark), Ans. Domain Name System, 13. Differentiate shared and dedicated web hosting, Ans., Shared hosting, , (Say2017,2 marks), Dedicated hosting, , Many different websites are stored The client leases the entire web server and all its, on one single web server, resources, Share resources like RAM and CPU The web server is not shared with any other website, 14. Explain responsive web design., , (Say2017,3 marks)
Page 67 :
Ans. Responsive web design is the custom of building a website suitable to work on every, device and every screen size, no matter how large or small, mobile phone or desktop or, television., 15. Answer any one question from 15 (a) or 15(b)., 15 (a) Amita wanted to get the name ‘www.smartproducts.com’ for her newly designed web, site. How is it possible?, (March2017,3 marks), Ans. 1. Buy a hosting space, 2. Domain name registration – Amita has to check whether this domain name is already, used by somebody else using www.whois.net site provided by ICANN. If the domain name is, available, then it can be registered., , ve, ., , in, , 15 (b) Ajith created a website using the software ‘Joomla’. What is the peculiarity of this, software and write any four advantages of using this software., (March2017,3 marks), Ans. Joomla is a popular Content Management System software., Advantages are:, It can be used to create, administer and publish web sites., Easy way to design and manage attractive web sites., Available for free download., , Hs, sli, , Chapter 8 - Data Base Management System, , 1. Explain any three fundamental operations in relational algebra., (Say 2019,3 marks), Ans., 1. SELECT operation is used to select rows from a relation that satisfies a given predicate., The predicate is a user defined condition to select rows of user's choice. This operation, is denoted using lower case letter sigma (σ ). The general format of select is as follows:, , σ condition (Relation)., , 2. The PROJECT operation selects certain attributes from the table and forms a new, relation. If the user is interested in selecting the values of a few attributes, rather than, all the attributes of the relation, then use PROJECT operation. It is denoted by lower, case letter π . The general format of project operation is as follows:, , π A1, A2,…., An (Relation), 3. UNION operation is a binary operation and it returns a relation containing all tuples, appearing in either or both of the two specified relations. It is denoted by ., 2. In DBMS, (Say 2019,5 marks), (a) Explain classification of database users, (b) Define the terms – Cardinality, Schema and Alternate key, Ans.
Page 68 :
Hs, sli, , ve, ., , in, , (a) 1. Database Administrator (DBA) : The person who is responsible for the control of the, centralized and shared database is the Database Administrator (DBA)., 2. Application Programmers : Application programmers are computer professionals who, interact with the DBMS through application programs, 3. Sophisticated Users : Sophisticated users include engineers, scientists, business, analysts, and others who are thoroughly familiar with the facilities of the DBMS., 4. Naive Users: Naive users interact with the system by invoking one of the application, programs that were written previously. They are not even aware of the details of the, DBMS., (b) Cardinality: The number of rows or tuples in a relation is called cardinality of the, relation, Schema: The description or structure of a database is called the database schema, which, is specified during database design. In the relational model, the schema for a relation, specifies its name, the name of each column, and the type of each column, Alternate Key: A candidate key that is not the primary key is called an alternate key, 3. First table containing 4 rows and 3 columns, second table contains 5 rows and 2 columns,, then the cartesian product table contains------------ rows and -----------------columns,, Ans. 20, 5, (March 2019,2 marks), 4. What is key ? Explain any two keys in a relational database management system?, Ans., (March 2019,3 marks), A key is an attribute or a collection of attributes in a relation that uniquely distinguishes, each tuples from other tuples in a given relation., Candidate key : A candidate key is the minimal set of attributes that uniquely identifies a, row in a relation. There may be more than one candidate key in a relation., . Primary key: A primary key is one of the candidate keys chosen to be the unique identifier for, that table by the database designer. A primary key is a set of one or more attributes that can, uniquely identify tuples within the relation., 5. Define the term Data independence. Explain different levels of data independence., Ans. The ability to modify the schema definition in one level without affecting the schema, definition at the next level is called data independence. There are two levels of data, independence, physical data independence and logical data independence., a. Physical data independence Physical data independence refers to the ability to modify the, schema followed at the physical level without affecting the schema followed at the, conceptual level., b. Logical data independence Logical data independence refers to the ability to modify a, conceptual schema without causing any changes in the schema followed at view (external), level., (March 2019,3 marks), 6. A candidate key that is not a primary key is called ---------- key., (Say2018,1 mark), Ans. Alternate key, 7. Define primary key and alternate key, (Say2018,2marks), Ans. A primary key is a set of one or more attributes that can uniquely identify tuples within the, relation., A candidate key that is not a primary key is called alternate key, 8. Write short note on union operation in relational algebra, (Say2018,2marks), Ans. UNION operation is a binary operation and it returns a relation containing all tuples, appearing in either or both of the two specified relations. It is denoted by
Page 69 :
9. Define the following terms :, (Say2018,3marks), (i) Cardinality, (ii) Schema, (iii) Tuple, Ans. (i) The number of rows or tuples in a relation, (ii) The description or structure of a database. Include the name of a relation, name and, type of each column., (iii) A row or a record in a relation, , in, , 10. Define the following :, (March2018,2marks), (a) Field, (b) Record, Ans. Field: A field is the smallest unit of stored data. Each field consists of data of a specific, type., Record: A record is a collection of related fields, , ve, ., , 11. Explain any three operators used in Relational algebra., (March2018,3marks), Ans., 1.SELECT operation is used to select rows from a relation that satisfies a given, predicate.. This operation is denoted using lower case letter sigma (σ ). The general, format of select is as follows:, , σ condition (Relation)., , Hs, sli, , 2. The PROJECT operation selects certain attributes from the table and forms a new, relation. It is denoted by lower case letter π . The general format of project operation is as, follows:, , π A1, A2,…., An (Relation), , 3. UNION operation is a binary operation and it returns a relation containing all tuples, appearing in either or both of the two specified relations. It is denoted by ., , 12. . Explain any three advantages of DBMS., (March2018,3marks), Ans., 1. Controlling data redundancy: Duplication of data is known as data redundancy. In, database systems all the data is kept at one place in a centralized manner., 2. Data consistency: Data redundancy may lead to data inconsistency; that is, the various, copies of the same data show different values in different files., 3. Data security: Data security refers to the protection of data against accidental or, intentional disclosure or unauthorized destruction or modification by unauthorized, persons. DBMS offers high security., 13. ---------- is the symbol used for select operation in relational algebra(Say2017,1 mark), Ans. σ, 14. Explain advantages of DBMS over conventional file system., Ans., , (Say2017,5 marks)
Page 70 :
1. Controlling data redundancy, 2. Data consistency, 3. Efficient data access, 4. Data integrity, 5. Data security, 6. Sharing of data, 7. Enforcement of standards, 8. Crash recovery, , in, , 15. Is it possible to combine select and project operations of relational algebra into a single, statement? Explain with example., (March2017,2 marks), Ans. Yes. Select and project operations can be combined in a single statement., for, Higher, Eg. To select admission number and name of students who are Eligible, Studies., π admnno, name ( σ result="EHS" ( STUDENT )), , Hs, sli, , ve, ., , 16. Explain different levels of abstraction in DBMS., (March2017,3 marks), Ans. Physical level - The lowest level of abstraction describes how data is actually stored on, secondary storage devices such as disks and tapes. The physical level describes complex lowlevel data structures in detail., Logical level (conceptual level) - The next-higher level of abstraction describes what, data is stored in the database, and what relationships exist among those data., View level - View level is the highest level of database abstraction and is the closest to, the users. It is concerned with the way in which individual users view the data., , Chapter 9 - Structured Query Language, , 1. The rules enforced on data that are entered into column of a table are called-----------------., Ans. Constraints, (Say 2019,1 mark), 2. Define view in SQL and the syntax of command used to create a view., Ans. A view is a virtual table that does not really exist in the database, but is derived from, one or more tables. Syntax used to create a view is:, (Say 2019,2 marks), CREATE VIEW <view name>, AS SELECT <column name1> [,<columnname2>], FROM <tablename>, [WHERE <condition> ];, 3. Consider the following table student :, (Say 2019,5 marks), Roll No, AdmNo, Name, Course, score, 11, 2008, Abdulla, commerce, 90, 12, 2009, Prasanth, Commerce, 85, 13, 2010, Jins, Commerce, 75, 14, 2011, Praveen, Humanities, 60, 11, 2012, Prasanth, Science, 45, 12, 2013, Pallavi, Science, 75
Page 71 :
13, , 2014, , Faizal, , Science, , 60, , in, , a) Can u suggest an attribute that can be selected as primary key? Justify your answer., b) Write SQL query to change the course attribute value 'Humanities' of the student Praveen, to 'Commerce'., (c) Write SQL query to display the name and score of all students who scored greater than 60., (d) Write SQL query to remove the details of students who scored less than 50., Ans., a) AdmNo can be selected as primary Key. No other keys can be selected to uniquely identify, each student. Here the domain of Roll No, Name, Course and score consists of duplicate values, b) Alter student set course = ‘Commerce‘ where name= ‘ Praveen’;, c) Select name, score from student where score>60;, d) Delete from student where score<50;, , Hs, sli, , ve, ., , 4. Explain any three situations to modify the structure of a table with the help of alter command, in sql., Ans., (March 2019,3 marks), 1. Adding a new column One or more columns can be added at any position in an existing, table. The syntax for adding a new column to a table is:, ALTER TABLE <table name>, ADD <column name> <datatype>[<size>] [<constraint>], [FIRST | AFTER <column, name>];, 2. Renaming a table: We can rename a table in the database by using RENAME TO along, with ALTER TABLE command. The syntax for renaming a table is:, ALTER TABLE <table name> RENAME TO <new tablename> ;, 3. Removing column from a table: If we want to remove an existing column from a table,, we can use DROP clause along with ALTER TABLE command. The syntax for removing a, column from a table is:, ALTER TABLE < table name>DROP<column name> ;, 5. Consider the table student with attribute admno, Name, course, percentage., Write the SQL statements to do the following :, (March 2019,5 marks), ii), Display all the student details., ii), Modify the course ’ Commercce ‘ to ‘ Science ‘., (iii), Remove the student details with percentage below 35., (iv), create a view from the above table with percentage greater than 90., Ans., i), select * from student;, ii), iii), iv), , update student set course=’Science’ where course=’Commerce’;, delete from student where percentage<35;, create view stud as select * from student where percentage >90;, , 6. Which is the keyword used to eliminate duplicate values in the selection?, Ans. Distinct, (Say2018,1 mark), 7. Differentiate between CHAR and VARCHAR in SQL, Ans. The CHAR is a fixed length character data type., , (Say2018,2marks)
Page 72 :
ve, ., , in, , VARCHAR represents variable length strings. It is similar to CHAR , but the space allocated, for the data depends only on the actual size of the string, not on the declared size of the column., 30. Define constraint. Explain any four column constraints., (Say2018,3marks), Ans. Constraints are the rules enforced on data that are entered into the column of a table., Column constraints are applied only to individual columns., i. NOT NULL, This constraint specifies that a column can never have NULL values, ii. AUTO_INCREMENT, MySQL uses the AUTO_INCREMENT keyword to perform an auto-increment feature. If, no value is specified for the column with AUTO_INCREMENT constraint, then MySQL will, assign serial numbers automatically and insert the newly assigned value in the corresponding, column of the new record., iii. UNIQUE, It ensures that no two rows have the same value in the column specified with this, constraint., iv. PRIMARY KEY, This constraint declares a column as the primary key of the table. A PRIMARY KEY, constraint is used to enforce a rule that a column should contain only unique, non- NULL data., 8. Write the names of any two column constraints and their usages ., Ans. Default: To set a default value in a column ., Unique: No two rows have the same value for a column., , (March2018,2marks), , Hs, sli, , 9. Define the following, (March2018,3marks), 1 DML, 2DDL, 3.DCL, Ans., DDL is Data Definition Language that provides commands to deal with the structure, of RDBMS. The DDL commands are used to create, modify and remove the database, objects such as tables, views and keys. The common DDL commands are CREATE,, ALTER, and DROP., DML is Data Manipulation Language that provides user interaction with the database, system by providing a set of commands. DML permits users to insert data into tables,, retrieve existing data, delete data from tables and modify the stored data. The common DML, commands are SELECT, INSERT, UPDATE and DELETE., Data Control Language (DCL) is used to control access to the database, which is required, for security purpose of database. DCL includes commands that control a database. The, commands GRANT and REVOKE are DCL commands., 10. Write the result of the following :, (a) ALTER TABLE <tablename>, Drop <column name>, (b) DELETE * FROM <tablename>, c)DROP TABLE<tablename>, , (March2018,3marks)
Page 73 :
Ans., a)Delete the column specified in the column name from the table, b)Error/Delete row from table, c)Delete the table itself, 11. ----------------- command in SQL is used to display the structure of a table., Ans. Describe, (Say2017,2mark), , in, , 12. Explain primary key constraint with an example, (Say2017,2 marks), Ans. A primary key is a set of one or more attributes that can uniquely identify tuples within the, relation. As it uniquely identifies each entity, it cannot contain null value and duplicate value., Example : Admission number, account number etc., , ve, ., , 13. Write SQL for :, (Say2017,3 marks), (a) Create a table student with the data [name char(20), rollno number(3), marks, number(3)]., (b) List name and rollno of all students, (c) List name and rollno of students having marks>600, Ans. (a) create table student(name cahr(20), rollno number(3), marks number(3));, (b) select name,rollno from student;, (c) select name,rollno from student where marks>600;, , Hs, sli, , OR, 14. An employee table contains name, empno, basicpay, desig., (Say2017,3 marks), Write SQL statements for:, (a) Display name,empno and bascipayof all managers (desig=”manager”), (b) Display empno and salary of all employees, (salary=basicpay+da), (da=basicpay*1.15), (c) Display name and empno of all the employees whose basicpay<10000., Ans. (a) select name,empno, basicpay from employee where desig=’manager’;, (b) UPDATE employee SET da = basicpay * 1.15;, UPDATE employee SET salary = basicpay + da;, select empno, salary from employee ;, (c) select name,empno from employee where basicpay<10000;, 15. In RDBMS, a relation contains 10 rows and 5 columns. What is the degree of the relation?, (March2017,1 mark), Ans. 5, 16. ---------------- is an SQL datatype which is used to represent variable length string., Ans. VARCHAR, (March2017,1 mark), 17. The structure of the table employee is given below., Empcode numeric, empname string, basicpay, numeric, , (March2017,5 marks)
Page 74 :
da, grosspay, , numeric, numeric, , Write SQL statement for the following :, (a) insert a record into the table, (b) update da with 60% basicpay, (c) display the details of employees whose basicpay is greater than 20000., (d) rename the table employee to empdetails, , in, , Ans. (a) insert into employee values(1005, ‘Vishnu’, 18000, null, null);, (b) update employee set da=basicpay*0.6;, (c) select * from employee where basicpay>20000;, (d) alter table employee rename to empdetails;, , 1. --------------- is an open source ERP, Ans. ODOO, , ve, ., , Chapter 10 – Enterprise Resourse Planning, (Say 2019,1 mark), , 2. Write short note on MIS., (Say 2019,2 marks), Ans. There are three components in MIS - Management, Information and System. Management, is the ultimate user or the decision maker, information is the processed data and system is the, integration and holistic view of the enterprise., , Hs, sli, , 3. Explain benefits of ERP system, (Say 2019,3 marks), Ans. Benefits of ERP system are:, 1. Improved resource utilization: An enterprise can plan and manage its resources, effectively by installing ERP software. So, the wastage or loss of all types of resources, can be reduced, and improved resource utilization can be ensured., 2. Better customer satisfaction: Customer satisfaction means meeting maximum, customers’ requirements for a product or service., 3. Provides accurate information In today's competitive world, an enterprise has to plan, and manage the future cleverly. So, an enterprise needs high quality, relevant and, accurate information., 4. Expand MIS, (March 2019,1 mark), Ans. Management Information System, 5. How Business Process Reengineering (BPR) is related to Enterprise Resource Planning, (ERP) ?, (March 2019,2 marks), Ans., Business process re-engineering is performed before enterprise resource planning., Conducting business process re-engineering before implementing enterprise resource, planning will help an enterprise to avoid unnecessary modules from the software., (March 2019,3 marks), 26. Explain the merits of ERP system., Ans.
Page 75 :
1. Improved resource utilization: An enterprise can plan and manage its resources, effectively by installing ERP software. So the wastage or loss of all types of resources, can be reduced, and improved resource utilization can be ensured., 2. Better customer satisfaction : Using an ERP system, a customer will get more, attention and service of an enterprise without spending more money and time. A, customer can place the order, track the status of the order and make the payment from, his/her home., An enterprise needs high quality, relevant and, 3. Provides accurate information:, accurate information. An ERP system will be able to provide such information for the, better future planning of the enterprise., , in, , 7. Write short note on Supply Chain Management, (Say2018,2marks), Ans. Supply Chain Management (SCM) is a systematic approach for managing supply, chain. SCM activities include inventory management, transportation management etc., , ve, ., , 8. Explain any three benefits of ERP system., (Say2018,3marks), Ans. 1. Improved resource utilization: An enterprise can plan and manage its resources, effectively by installing ERP software, 2. Better customer satisfaction: Using an ERP system, a customer will get more attention, and service of an enterprise without spending more money and time, 3. Provides accurate information: ERP system will be able to provide high quality,, relevant and accurate information for the better future planning of the enterprise., , Hs, sli, , 9. Define BPR., Ans. Business Process Reengineering, , (March2018,1mark), , (March2018,2marks), 10. Define the following ERP related technologies :, (a) CRM, (b) SCM, Ans., a) CRM: Customer Relationship Management. CRM is a broadly used term that covers, policies used by an enterprise to manage their relationships with customers., b) SCM: Supply Chain Management. The supply chain consists of all the activities, associated with moving goods from the supplier to the customer, 11. Write short note on SAP., (March2018,2marks), Ans: SAP stands for Systems, Applications and Products for data processing. It is a German, multinational software corporation founded in 1972. The company started by developing, software for integrated business solutions. In the beginning, the software was developed, aiming at large multinational companies., 12. List the benefits of ERP implementation in an enterprise., (Say2017,3 marks), Ans., 1. Improved resource utilization, 2. Better customer satisfaction, 3. Provides accurate information, 4. Decision making capability, 5. Increased flexibility, 6. Information integrity
Page 76 :
13. SAP stands for -------------------- ., Ans. Systems, Applications and Products, , (Say2017,1 mark), , ve, ., , in, , 14. Answer any one question 25(a) or 25 (b)., (March2017,5 marks), (a) Explain the importance of BPR in ERP implementation., OR, (b) Selection of ERP package is very crucial in the implementation of ERP system. Give, a short note on any four ERP packages., Ans. (a) - It involves changes in structure and process of a business environment., - BPR which includes identification of business process, analysis of current business, process, designing of a revised process and implementation of revised process., - Business process re-engineering will help an enterprise to determine the changes in the, structure or process of a business for better aspects., - ERP and BPR are related and they go hand in hand, and in most of the cases business, process re engineering is performed before enterprise resource planning, - BPR and ERP are used together to achieve better result for the enterprise and to, improve existing ERP., , Hs, sli, , (b) Popular ERP packages are Oracle, SAP, Odoo, Microsoft Dynamics, and Tally., Oracle - The ERP package from Oracle provides strong finance and accounting, module. It also provides good customer and supplier interaction, effective production, analysis, efficient human resource management and better pricing module., SAP - SAP stands for Systems, Applications and Products for data processing. SAP also, developed Customer Relationship Management (CRM), Supply Chain Management, (SCM), and Product Life cycle Management (PLM) software., Odoo – Open source ERP package. Formerly known as Open ERP., Microsoft Dynamics - Microsoft Dynamics is part of Microsoft business solutions., It provides a group of enterprise resource planning products primarily aimed at midsized, enterprises. This package can be installed and used easily and it provides good user, interface., Tally ERP - Tally ERP is a business accounting software for accounting, inventory and, payroll., , Chapter 11 – Trends and Issues in ICT, , 1. Define the following terms :, (Say 2019,2 marks), (a) Cyber forensics, (b) Infomania, Ans. ( a ) Cyber forensics: Cyber forensics can be defined as the discipline that combines, elements of law and computer science to collect and analyse data from computer systems,, networks, communication systems and storage devices in a way that is admissible as evidence, in a court of law.
Page 77 :
( b) Infomania is the state of getting exhausted with excess information. It occurs due to, accumulation of information from many sources like Internet, e-mail and cell phones, but, cannot be processed., , in, , 2. Briefly explain the application of RFID (Radio Frequency Identification) Technology in the, field of business logistics., (Say 2019,3 marks), Ans., Radio Frequency Identification (RFID) technology can be used to identify, track, sort or, detect a wide variety of objects in logistics. RFID hardware consists of a RFID tag and a, reader. The RFID tag consists of a combination of transmitter and responder. This tag, contains a microchip for storing data and a sending and receiving antenna for data, exchange with the RFID reader. RFID gives transportation and logistics operations, increased visibility into product movement and business processes. It increases efficiency, by providing real-time data that gives up-to-date information about the products., , Hs, sli, , ve, ., , 3. Define the terms :, (March 2019,2 marks), i) Cyber Forensics, II) Infomania., Ans, ( a ) Cyber forensics: Cyber forensics can be defined as the discipline that combines, elements of law and computer science to collect and analyze data from computer, systems, networks, communication systems and storage devices in a way that is, admissible as evidence in a court of law., ( b) Infomania is the state of getting exhausted with excess information. It occurs due, to accumulation of information from many sources like Internet, e-mail and cell, phones, but cannot be processed., 4. Compare GPRS and EDGE, (March 2019,3 marks), Ans., GPRS is a packet oriented mobile data service on GSM. When compared to, conventional GSM, users of GPRS benefited from shorter access time and higher data, rates. GPRS allows billing based on volume of data transferred., EDGE is a digital mobile phone technology that allows improved, data transmission rates for GSM. EDGE is a superset to GPRS and can function on any, network with GPRS. It provides nearly three times faster speeds than the GPRS system., 5. Expand the term CDMA., Ans. Code Division Multiple Access, , (Say2018,1 mark), , 6. Write a short note on mobile operating system, (Say2018,2marks), Ans. A mobile operating system is the operating system used in a mobile device (smart phone,, tablet, etc.), similar to an operating system used in a desktop or laptop computer. Popular, mobile operating systems are Android from Google, iOS from Apple, BlackBerry OS from, BlackBerry and Windows Phone from Microsoft., 7. Define the following term:, , (Say2018,2marks)
Page 78 :
(i) SIM, (ii) MMS, Ans., (i) SIM (Subscriber Identity Module) cards help to identify a subscriber, roam across, networks and provide security to value added services like Internet browsing, mobile, commerce, mobile banking, etc., (ii) Multimedia Messaging Service (MMS) is a standard way to send and receive, messages that consists of multimedia content using mobile phones., 8. Name the intellectual property represented by the symbol®,©, Ans. Registered trade mark, copyright, , (March2018,1mark), , ve, ., , in, , 9. Define the following terms :, (March2018,2marks), (a) Trademark, (b) Copyright, a) Trademark: A trademark is a distinctive sign that identifies certain goods or services, produced A trademark can be a name, logo, symbol, etc. that can be used to recognise a, product or service, b) Copyright: A copyright is a legal right given to the creators for an original work,, usually for a limited period of time. Copyright applies to a wide range of creative,, intellectual or artistic forms of works which include books, music, painting, sculpture,, films, advertisement and computer software., , Hs, sli, , 10. Name the following :, (a) Satellite based Navigation system, (b)Service used to send messages with Multimedia content., (c) Packet oriented mobile data service on GSM, (d) Smart card technology used only in GSM phone Systems, Ans., a)GPS, b)MMS, c)GPRS, d)SIM, , (March2018,2marks), , 11. ----------------- is the popular mobile OS developed by Google based on Linux kernel, (Say2017,1 mark), Ans. Android, 12. Differentiate GPS and EDGE., Ans., , GPS, , (Say2017,2 marks), , EDGE, , Satellite based navigation system to digital mobile phone technology that allows, locate a geographical position, improved data transmission rates for GSM, Used for tracking vehicles, aircrafts etc., , Superset to GPRS and can function on any, network with GPRS deployed on it
Page 79 :
13. Write a short note on IPR infringement., (Say2017,3 marks), Ans. Unauthorised use of intellectual property rights such as patents, copyrights and trademarks, are called intellectual property infringement. It may be a violation of civil law or criminal law,, depending on the type of intellectual property, jurisdiction (countries) and the nature of the, action. Different types are patent infringement, copyright infringement, trademark infringement, 14. Pick the odd one out :, (a) KitKat, (c) Icecream Sandwitch, , (Say2017,1 mark), (b) Jelly Bean, (d) iOS, , Ans. iOS (all others are the versions of Android OS), (March2017,1 mark), , in, , 15. A 4G mobile network uses --------------., Ans. OFDMA, , ve, ., , 16. Write a short note on Android operating system., (March2017,2, marks), Ans. Android is a Linux-based operating system designed mainly for touch screen, mobile devices. It was originally developed by Android Inc. In 2005, Google acquired, Android Inc. making it a wholly owned subsidiary of Google. The Android OS consists, of a kernel based on Linux kernel., , Hs, sli, , 17. What is copyright? How does it differ from patent?, (March2017,3 marks), Ans. A copyright is a legal right given to the creators for an original work, usually for a, limited period of time. This covers rights for reproduction,, communication to the public, adaptation and translation of the work., A patent is the exclusive rights granted for an invention. It is the legal right obtained by, an inventor for exclusive control over the production and sale of his/her mechanical or, scientific invention for a limited period of time.