CBSE Guess > Papers > Important Questions > Class XII > 2009 > Computer Science > Computer Science By Mr. Shekhar Tripathi CBSE CLASS XII Q. 1. Define any two features of OOPs. Also give suitable example in C++. Q. 2. (a) Name the Header file(s) that shall be needed for successful compilation of the following C++ code void main() (b). Rewrite the following program after removing syntactical error(s) if any. Underline each correction. (c). Find the output of the following program : #include<iostream.h> (d). Find the output of the following program #include<iostream.h> (e). In the following C++ program , what will the maximum and minimum value of r generated with the help of random function. #include<iostream.h> Q. 2. (a). Differentiate between a Constructor and Destructor in context of class and object . Give suitable example in C++. (b). Answer the questions (i) and (ii) after going through the following class : class Computer {
(c). Define a class Student in C++ with the description given below : private members public members init() function to ask and store the values of rno, name, address and marks in 5 subjects. MARK SHEET (d). Answer the questions (i) to (iv) based on the following code : class Employee char date[10];
Q. 3. (a) Write a function in C++ which accepts a integer array and its size as an arguments and prints the output (using nested loops) in following format : Example : if the array is having Then the output should be (b). An array A[10][20] is stored in the memory with each element occupying 2 bytes of storage. If the Base address of array in the memory is 800 , determine the location of A[9][10] when the array is stored as (i) Row Major (ii) column major. (c). Write a function in C++ to delete a node containing names of student ,
from a dynamically allocated Queue of names implemented with the help struct student }*front , *rear; (d). Consider the following portion of a program , which implements a linked stack for Library . Write the definition of function PUSH(),to insert a new node in the stack with required information struct Library { (e). Convert the following infix expression into postfix. show the stack status after execution of each operation: TRUE OR FALSE AND NOT FALSE OR FALSE Q. 4. (a). Differentiate between ios::app and ios::ate file opening modes. (b). Write a function in C++ which will print the size of a text file “story.txt” in the form of bytes. (c). Write a function in C++ which will increase the qty of a particular type of item from the file “stock.dat” . Assuming that the binary file is containing the records of following structure : struct Products Accept the item type from user whose qty has to be increased . Q. 5. (a). What do you understand by Primary Key (b). Consider the following tables Employee and salary. Write SQL commands for the statements (i) to (iv) and give outputs for SQL queries (v) to (viii) Table : Employee
Table : Salary
Q. 6. (a) State and prove the Distributive law algebraically. (b). Write the equivalent POS expression of following SOP form F (x,y,z)= ∑ (0,2,4,6) (c). Draw the Logical circuit of the following expression with the help of NAND gate only x+yz (d). Obtain the simplified form of a Boolean expression using K-Map. F(a,b,c,d)=∑(0,1,2,3,4,7,11,12,14) Q. 7. (a). What do your understand by Hackers? (b). Differentiate between Internet & Intranet (c). Expand the following terminology :
(d). Define Repeater. (e). A company in Reliance has 4 wings of buildings as shown in the diagram: Center to center distances between various Buildings: Number of computers in each of the wing:
Paper By Mr. Shekhar Tripathi |