Page 1
Total number of printed pages: 4 NB/XII/CSC/1
2022
COMPUTER SCIENCE
Total marks : 70 Time : 3 hours
General instructions:
i) Approximately 15 minutes is allotted to read the question paper and revise the
answers.
ii) The question paper consists of 29 questions. All questions are compulsory.
iii) Marks are indicated against each question.
iv) Internal and general choice have been provided in some questions.
N.B: Check to ensure that all pages of the question paper are complete as indicated on the top
left side.
1. What is normal exit? 1
2. Define Keyword. 1
3. What is the purpose of function prototype? 1
4. Define abstraction. 1
5. What is meant by stream? 1
6. What is the meaning of “this” pointer? 1
7. Why array is called static data structure? 1
8. List two ways to implement stack. 1
9. What is meant by cardinality? 1
10. Define candidate key. 1
11. What is a bridge? 1
12. Define Unicode. 1
13. What is copy constructor? What is meant by constructor overloading? 2
14. Differentiate between multiple and multilevel inheritance. 2
15. What are pointers? What are the two operators used with pointers? 2
16. What is the output of the following program? 2
#include <iostream.h>
#include <conio.h>
Page 2
-2- NB/XII/CSC/1
void main( )
{
clrscr( );
int x[10] = {10, 11, 12, 13, 14, 15, 16, 17, 18, 19};
int i;
for (i = 0; i < 10; i++)
{
cout <<'' i = '' << i << '' x[i] = '' << x[i]
<< '' *(x + i) = '' << *(x + i);
cout << endl;
}
}
17. Define insertion and merge sort. 2
18. What is meant by front and rear in queues? 2
19. How can one drop a column from a table? 2
20. Prove the following by truth table: 2
x + x'y = (x + x')(x +y)
21. Prove the following algebraically. 2
x.(x +y) = x
22. What is TCP/IP? 2
23. What is freeware and shareware? 2
24. a. What is Object Oriented Programming? How is it different from Procedural
Programming?
Or 4
b. What is operator overloading? Explain with example.
25. Answer any three (3) questions.
(a) Define a class employee with the following specifications: 4
Private members of class employee
empno integer
ename 20 characters
basic, hra,da float
netpay float
calculate() a function to calculate:
basic + hra + da with float return type
Public member function of class employee
havedata() function to accept values for empno.
sname, basic, hra, da and invoke calculate()
to calculate netpay.
dispdata() function to display all the data members on the screen.
Page 3
-3- NB/XII/CSC/1
(b) Define data members, member function, private and public members with
examples. 4
(c) Write down some characteristics of destructors. 4
(d) What is meant by visibility modes in class derivations? What are these
modes? 4
(e) Consider the following C++ declarations and answer the questions given 4
below:
class ALPHA{
int x, y;
protected:
void putvalA( );
public:
void getvalA( );
};
class BETA : private ALPHA {
int m, n;
protected:
void getvalB ( );
public:
void putvalB( );
};
class GAMMA : protected BETA {
int a;
public:
void getdata( );
void showdata( );
};
(i) Write the names of member functions, which are accessible from the
objects of class GAMMA.
(ii) Write names of data members, which are accessible from the member
functions of class BETA.
(iii) Name the base class and derived class of class BETA.
(iv) Name the private member functions of class GAMMA.
(f) Differentiate between fstream class and ifstream class. 4
26. Answer any two (2) questions.
(a) Consider the following key set : 42, 29, 74, 11, 65, 58, use
insertion sort to sort the data in ascending order and indicate the
sequence of steps required. 4
(b) X[1..16][1..10] is a two dimensional array. The first element of
the array is stored at location 100. Each element of array
occupies 6 bytes. Find the memory location of X[2][4] when (i)
array is stored row wise and (ii) array is stored column wise. 4
Page 4
-4- NB/XII/CSC/1
(c) Evaluate the following postfix expression using a stack and show
the contents of stack after execution of each operation:
100, 40, 8, +, 20, 10, , +, * 4
(d) Write down the steps used to convert infix expression into postfix
form? 4
27. a. What is SQL? Explain the three features of SQL.
Or 4
b. Write SQL commands for (i) to (vii) on the basis of the table
SPORTS:
Student
Class Name Game1 Grade Game2 Grade
No.
10 7 Sameer Cricket B Swimming A
11 8 Sujit Tennis A Skating C
12 7 Kamal Swimming B Football B
13 7 Veena Tennis C Tennis A
14 9 Archana Basketball A Cricket A
15 10 Arpit Cricket A Athletics C
(i) Display the names of the students who have grade ‘C’ in either
Game1 or Game2 or both.
(ii) Display the number of students getting grade ‘A’ in Cricket.
(iii) Display the names of the students who have same game for both
Game1 and Game2.
(iv) Display the games taken up by the students, whose name starts
with ‘A’.
(v) Add a new column named “Marks”.
(vi) Assign a value 200 for Marks for all those who are getting grade
‘B’ or grade ‘A’ in both Game1 and Game2.
(vii) Arrange the whole table in the alphabetical order of Name.
28. a. Reduce the following Boolean expression using K-Map.
F(P, Q, R, S) = π(0, 3, 5, 6, 7, 11, 12, 15)
Or 4
b. State Demorgan’s laws. Verify one of the Laws using truth table.
29. a. Differentiate between packet switching and message switching
technique in network communication.
Or 4
b. What is the role of front end and back end in cloud computing
architechture?
************************