Answer key SUBJECT : COMPUTER SCIENCE Time : 3 hour 15 min Max. marks : 70 I. Answer ALL the questions 10 x 1= 10 1. What is DHTML? Dynamic HTML is a term used to describe the combination of HTML, style sheets and scripts that allows documents to be animated. 2. Define e-ecommerce. It refers to the trade of goods and services with the help of telecommunication and internet. 3. Define Local Area Networking. LAN is a network covering a small geographic area, like a home, office, or building. 4. Define the term topology of computer networks. Topology is the actual appearance or layout of networking. 5. Define data mining. The practice of examining large pre-existing databases in order to generate new information is called data mining. 6. How do you initialize a pointer variable? int *ptr, a; ptr = &a; 7. What is the significance of scope resolution operation in C++? When we declare the member function inside the class and define it outside the class, we must refer the class it belongs to. This is done using the scope resolution operator. 8. Name any one non-linear data structure. tree 9. Write the standard symbol for XOR gate. 10. Expand ISA. Industry Standard Architecture.
II. Answer any TEN questions 10 x 2 = 20 11. Prove algebraically that (X + Y) (X + Z) = X + YZ LHS = (X + Y) (X + Z) = XX + XZ + YX + YZ = X + XZ + XY + YZ [XX=X] = X(1+Z+Y)+YZ [1+X=1] = X.1+YZ [X.1=X] = X+YZ = RHS 12. Give the general syntax for defining classes and objects. Syntax for defining class: class class_name { private: Member data Member functions protected: Member data Member functions public: Member data Member functions }; Syntax for defining objects: Class_name object_name; 13. What are minterms and maxterms? Minterm is a product of all the literals (with or without the bar) within the logic system. A maxterm is a sum of all the literals (with or without the bar) within the logic system. 14. Mention any two antivirus software. Kaspersky, McAFee 15. Write the syntax for delete and insert command in SQL. DELETE FROM table_name WHERE condition; INSERT INTO table_name VALUES (value1,value2,value3,...);
16. Write any two rules for constructors. The name of a constructor is same as that of class in which it is declared. Constructors do not have any return type, not even void. 17. Write any two member functions belonging to ofstream class. put(), write() 18. What are the advantages and disadvantages of ISAM? Advantages 1. It combines the best features of sequential access and direct access. 2. Permits quick access of records even when the number of records is very large. Disadvantages 1. It requires special software and is expensive. 2. Extra processing time is required to process the indexes. III. Answer any FIVE questions 5 x 3 = 15 19. What is web hosting? Mention various web hosting services. Web hosting is a means of hosting web-server application on a computer system through which electronic content on the internet is readily available to any webbrowser client. Different types of web hosting services are free hosting, Virtual or shared hosting, Dedicated hosting, Collocation Hosting 20. What is meant by shareware? Write its limitations. Software for which license fee is payable after some time limit is called shareware. Disadvantage: Shareware cannot be modified, and it may be either a cut down or temporary version. Within the limit if the license fee is paid it cannot be used. 21. Explain relational data model with an example. In relational data model, data is organized in two-dimensional tables called relations.
The relational data model was developed by E.F Codd in 1970. DB2, MS-SQL Server is few of the popular relational DBMSs. Oracle, Sybase, 22. Give the functions of the following : a. get() - It reads a single character from the associated stream. b. getline() - It is used to read a whole line of text c. read() - It reads binary data from a file 23. Explain the use of new and delete operators in pointers. e is the key ord used to allo ate e ory dy a i ally at the ti e of program execution. E.g.: int *ptr = new int; delete key ord is used to u allo ated e ory allo ated dy a i ally. E.g.: int *ptr = new int; delete ptr; 24. What is stack? Write an algorithm for POP operation. Stack is an ordered collection of items where addition and deletion take place at the same end. Algorithm for POP Operation Step 1: If TOP = -1 then P INT ta k is e pty Exit End of If Step 2: ITEM = STACK[TOP] Step 3: TOP = TOP 1 Step 4: Return 25. Draw the logic diagram and truth table for 2 input XOR gate.
26. Expand UPS. Explain the types of UPS. Uninterruptible Power Supply There are two types of UPS. Online UPS and Standby UPS. Online UPS: An online UPS avoids those momentary power lapses by continuously providing power from its own inverter, even when the power line is functioning well. Standby UPS: A standby UPS (or Off-line UPS) monitor the power line and switches to battery power as soon as it detects a problem. The switch over process may take several milliseconds during which system is not receiving any power. IV. Answer any SEVEN questions 7 x 5 = 35 27. Write an algorithm to insert an element into a queue. Algorithm to insert element in queue Step 1: Step 2: Step 3: Step 4: If REAR = N-1 Then P INT O erflo Exit End of IF If FRONT = NULL Then FRONT = 0 REAR = 0 Else REAR = REAR + 1 QUEUE[REAR] = ITEM Return
28. Write an algorithm for insertion sort method. Algorithm for insertion sort: Step 1 : for (i = 1 to N-1) Step 2 : j= i Step 3 : while(j>=1) If (A[j] < A[j-1] Temp = A[j] A[j] = A[j-1] A[j-1] = Temp [End if] j=j-1 [End of while loop] [End of for loop] Step 4 : Exit 29. Using K-map, simplify the following expression in four variables: F(A, B, C, D) = m1+m2+m4+m5+m9+ m11+m12+m13 Quad 1: Reduced term B Quad 2: Reduced term C Pair 1 : Reduced term A D Which couldn t be paired : C Final reduced term B + C + A D + C 30. Write the rules to be followed in writing constructor function in C++. a. The name of a constructor is same as that of class in which it is declared.
b. Constructors do not have any return type, not even void. c. Constructors are always defined in the public section of the class. d. Like other C++ functions, constructors can also have default arguments. e. It is not possible to refer to the address of a constructor. 31. Describe briefly the use of friend function in C++ with syntax and example. A friend function is a non-member function of a class which gets access to private, protected and public data of a class. It is declared within a class with the prefix friend. If there is a situation where an outside function must get access to members of one or more class we can implement it by declaring that function as friend in side those functions Syntax: class class_name { Member declarations; friend return_type function_name(parameter list); }; Example: class Husband { private: int salary; public: void read() { cin >> salary; } friend int total(husband, Wife); }; 32. Explain defining objects of a class with syntax and a programming example. Memory is allocated only when the object is created. All operations related to class are done using object. Following is the syntax for declaration of object. class_name object_name1, object_name2,...; Example: class number { private: int num;
public: void read() { cin>>num; } }; void main() { number N1, N2, N3; //objects of the class number }; 33. Define object oriented programming. Write the limitations of object oriented programming. Object Oriented Programming (OOP) can be defined as a programming paradigm that represe ts o epts as o je ts that ha e data fields a d asso iated procedures known as methods. Limitations: a) No set standards: Object oriented programming software is not having set standards. b) Less reality: To convert a real world problem into an object oriented model is difficult. c) Classed are overly generalized: With Object oriented programming, classed are overly generalized. d) Program design difficult and tricky: Adaptability of flow diagrams and Object oriented programming is a complex process. This makes program design difficult and tricky. e) Needs to think in terms of objects: Programmer needs skill to think in terms of objects. 34. Explain network securities in detail. Network security is to make sure that only legal or authorized user and programs gain access to resources in the network. Some of the problem that may occur are: 1) Physical Security holes-when individuals gain unauthorized physical access to a computer. 2) Software Security holes-when badly written programs are doing things that they should not be doing.
3) Inconsistent usage holes-when the system administrator assembles a combination of hardware and software but it is seriously imperfect from a security point of view. 35. Describe any five logical operators available in SQL. IN "Equivalent to any member of" test. Equivalent to "= ANY". SELECT * FROM EMP WHERE ENAME IN ('SMITH', 'WARD'); ANY NOT IN ALL [NOT] BETWEEN x and y Compares a value to each value in a list or returned by a query. Must be preceded by =,!=, >, <, <=, or >=. Evaluates to FALSE if the query returns no rows. Equivalent to "!= ANY". Evaluates to FALSE if any member of the set is NULL. Compares a value with every value in a list or returned by a query. Must be preceded by =,!=, >, <, <=, or >=. Evaluates to TRUE if the query returns no rows. [Not] greater than or equal to x and less than or equal to y. SELECT * FROM DEPT WHERE LOC = ANY ('NEW YORK','DALLAS'); SELECT * FROM DEPT WHERE LOC NOT IN ('NEW YORK', 'DALLAS'); SELECT * FROM emp WHERE sal >= ALL (1400, 3000); SELECT ENAME, JOB FROM EMP WHERE SAL BETWEEN 3000 AND 5000; 36. Write the difference between Manual and Electronic Data Processing. Manual data processing Electronic data processing 1. For a given time, the data that can Large volume of data can be be processed is less in volume processed within a short period. 2. Manual data processing requires large quantity of paper. 3. The speed and accuracy at which the job is executed is limited 4. Since a lot of manual processing is involved the cost of labour is high. 5. Storage medium is paper. It makes the data processing work more Computers eliminate the usage of papers. Reasonably very less amount of paper will be used. The job executed is faster and accurate. Labour cost is economical as the number of staff required is less. Storage medium is secondary storage devices that can hold huge
tedious and tiresome amount of data. 37. Explain briefly the types of inheritance. 1) Single inheritance: If a class is derived from a single base class, it is calls as single inheritance. 2) Multilevel inheritance The classes can also be derived from the classes that are already derived. This type of inheritance is called multilevel inheritance. 3) Multiple inheritance If s class is derived from more than one base class, it is known as multiple inheritance. 4) Hierarchical inheritance If more than one classes are inherited from a base class, it is called as hierarchical inheritance. 5) Hybrid inheritance Combination of more than one form of inheritance is known as hybrid inheritance.
----------xxx----------