CBSE Set Q Computer Science Class XII 1998 Sample Test Papers For Class 12th for students online
Science Class XII (CBSE)
You are on questions
Q no. 1 (a) Define the following
terms: (i) Inheritance (ii) Encapsulation.
Q no. 1 (b) Name the header files, to which the
following built-in-functions belong to:
(i) cos() (ii) setw() (iii) toupper() (iv) strcpy()
Q no. 1 (c) Find the syntax error(s), if any, in the following program:
void main( )
20: cout<<"Lower Range"<<endl;
30: cout<<"Middle Range"<<endl;
40: cout<<"Higher Range"<<endl;
Q no. 1 (d) Give the output of the following
for(int x=0;x<strlen(NAME); x++)
NAME [ x] = toupper ( NAME [x]);
if(isupper(NAME [x] ) )
NAME [x] = tolower ( NAME [x] );
Name [x] = NAME [ x - 1 ];
Q no. 1 (e) Write the output of the following program:
void Execute(int &X, int Y=200)
void main ( )
int A=50, B=20;
Execute( A, B);
Q no. 1 ( f ) Write a C++ function having two value parameters X and N with result type float to find the sum of series given
Q no. 2
(b) Define a class student with the following specifications:
eng, math, science
public member functions of class student
function to accept values for admno,
sname, eng, math, science and invoke ctotal to calculate total.
|Q no. 2 (c) Consider the following declarations and answer the questions given below:|
class QQQ: private PPP
(i) Name the base class and derived class
of the class QQQ.
Q no. 3 (a) Suppose an array P containing
float is arranged in ascending order. Write a user defined function in
C++ to search for one float from P with the help of binary search
method. The function should return an integer 0 to show absence of the
number and integer 1 to show presence of the number in the array. The
function should have the parameters as (1) an array P (2) the number
DATA to be searched (3) number of elements N.
Q no. 4 (b) Assuming the class EMPLOYEE
given below, write functions in C++ to perform the following:
Q No.5 (a) What is a relation? What is
the difference between a tuple and an attribute?
(b) To select all the information of
patients of cardiology department.
Q No. 7 (a) What are repeaters?