Repeater (ii) Hub/Switch F Name two Proprietary softwares along with their application [1] G How Trojan Horses are different from Worms? Mention any one difference. [1] H Out of the following, identify client side script(s) and server side script(s). i) java script ii) ASP iii) vb script iv) PHP [1]
(D) Write a function in C++ to perform insert operation on a dynamically allocated Queue. struct Node { int Code; char Description[10]; Node * link; } 4 (E) Evaluate the following postfix notation of expression :(Show status of Stack after each operation) True,False,NOT,OR,False,True,OR,AND 2 4. (A) Observe the program segment given below carefully and fill the blanks marked as Statement 1 and Statement 2 using seekg() and tellg() functions for performing the required task. #include <fstream.h> class Employee 1
} int *getproduct() { return Pcode; } }; Q.5. (A) What do you understand by Candidate Keys in a table ? Give a suitable example. 2 (B) Consider the following tables SHOP and SUPPLIER and answer the following questions: TABLE : SHOP TABLE : SUPPLIER Write SQL commands for the following statements i to iv and Output for v to viii (I) To display details of all the items in the shop table in ascending order of Buydate. 1 Mark 1 (II) To display ICODE and INAME of the items with QTY more than 100. 1
} f.close(); cout<<"Number of words starting with amend are "<<cnt; } 2 marks for the correct any correct program which gives correct output (c) void search( long MNo) { ifstream ifile(“COMPUTER.DAT”, ios::in | ios::binary); if(!ifile) { cout<<”could not open COMPUTER.DAT file”; exit(-1); } else { COMPUTER c; int found = 0; while(!ifile.read( ( char *) &c, sizeof(c))) { if( c.getModelNo( ) ==MNo) { c.stockdisplay( ); found = 1; break; } } } if(found = =0) cout<< “Given Model No is Not found”; ifile.close( ); } 3 ½ marks for declaring stream ½ marks for opening and closing the stream 2 marks for writing any correct code which give the correct idea of function 5. (a) Data Independence is the ability to modify a scheme definition in one level without affecting a scheme definition in the next higher level. There are two levels of data independence: Physical and Logical Physical Data Independence: refers to the ability to modify the scheme followed at the physical level without affecting the scheme followed at the conceptual level. i.e the application programs remains the same even though the scheme at the physical level gets modified. Logical Data Independence: refers to the ability to modify the conceptual scheme without causing any changes in the schemes followed at view level. The logical data independence ensures that the application programs remains the same. 2 ½ marks for defining data independence. ½ mars for giving the name of both the data independence 1 mark for defining Physical and Logical data independence. (b) (i). SELECT CnorID from CONSIGNOR WHERE City = ‘Mumbai’; (ii). SELECT CneeID, CnorName, CnorAddress, CneeName, CneeAddress FROM CONSIGNOR, CONSIGNEE WHERE CONSIGNOR.CnorID = CONSIGNEE.CnorID; 1 1
Max Marks:70 Name of Chapter Q.No Sub Questions (1) Mark (2) Mark (3) Mark (4) Mark Grand Total 1 Review of C++ covered in Class XI 1 a) (2) 12 b) (1) c) (2) d) (2) e) (3) f) (2) 2 Object Oriented Programming in C++ 2 a) (2) 12 b) (2) c) (4) d) (4) 3 Data Structures and Pointers 3 a) (3) 14 b) (3) c) (2) d) (2) e) (4) 4 Data File Handling in C++ 4 a) (1) 06 b) (2) c) (3) 5 DBMS and SQL 5 a) (2) 08 b) (2) (4) 6 Boolean Algebra 6 a) (2) 08 b) (2) c) (1) d) (3) 7 Networking and Open Source Software 7 a) (2) 10 b) (2)
(ii) destructor, invoked when object goes out of scope c) (i) Correct syntax for class and private members declaration (ii) default constructor (iii) function setPrice() definition (iv) function setdetails(), display() definitions ½ + ½ 1 1 1 d) (i) Hierarchical inheritance (ii) Location, Area, Sale (iii) Enter(),Show(),Register(),ShowC() (iv) Input(),Output() 1 1 1 1 3 a) Any correct logic 3M b) 1 mark for formula 2 marks for procedure and result 1+2 c) Any correct logic 2 d) 1 mark for showing step by step stack contents 1 mark for final answer 1+1 e) void insert() { If(rear=size-1 && front ==0|| front=rear+1) { cout<<”queue full….”; return; } else if( rear= -1){ rear++; front++;} else if(rear==size-1) rear=0; else { 4
29:28:25:26: Explanation 1 e) 40 2 f) Definition Example 1 1 2 a) Definition Example 1 1 b) Function1- Constructor() Function2- ~Destructor() Function1- when object is created Function2- when the scope of object is over 1 1 c) Class definition Store () Calculate() Accept(); ShowBill() 1 1 1 1 d) 1 mark for each corrected answer 4X1 3a) Declaration of function Logic & body 1 2 b) Correct A[20][10]=8720 A[2][5]=9328 2 2 c) insert() del() 2 2 d) Correct Answer=54 2 e) Function Declaration Logic & Body ½ 1½
4a) Line1File.seekg()-1*sizeof(cn),ios::cur); Line2:file.write((char*)&c,sizeof(cn); ½ ½ b) Function Definition Opening the file and for loop 1 1 c) Function Declaration File input& output file stream format While loop and file close ½ 1½ 1 5 a) Definition for each Explain 1 1 b) Select * from Employee where City=”New Delhi”; Delete from Employee where Empid=215; Select fistname, lastname max(salary) from Employee,empSalary where Employee.Empid=EmpSalary.empid Select sum(Sarary) from EmpSalary group by Designation Manila 50000 Rober 45000 Ritu 40000 9 Designation Sum(Salary) Director 80000 Salesman 60000 Sum(Benefits) 215000 1 1 1 ½ ½ ½ ½ a) De Morgan’s First Theoram; (X+Y)’=x’.Y’,(X.Y)’=X’+Y’ II) Truth Table ½ x½
1 1 b) k-Map Drawn Groups making Solution 1 1 1 c) Correct law Correct prove 1 1 d) Correct Answer 1 7 a) Global System for Mobile Communication Network Interface Card ½ ½ b) Correct difference: Two difference each 1 1 c) Correct answer 1 d) Definition Explanation 1 1