Page 1
Total number of printed pages: 3 NB/XII/CSC/1
2021
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 32 questions. All questions are compulsory.
iii) Marks are indicated against each question.
N.B: Check that all pages of the question paper are complete as indicated on the top left side.
1. How is ‘/’ operator different from ‘%’ operator? 1
2. What is a string? 1
3. Define structure. 1
4. Define objects. 1
5. What are member functions? 1
6. Why is constructor needed? 1
7. What is meant by inheritance? 1
8. What is an Array? 1
9. Define linked list. 1
10. What is query? 1
11. What are binary variables? 1
12. Define Router. 1
13. What is the difference between (i) num = 0 (ii) num==0? 2
14. Why is main function special? Give two reasons. 2
15. What is meant by Data encapsulation and Data hiding? 2
16. Write the format of class declaration. 2
17. Find the error, if any in the following program: 2
class num{
Page 2
-2- NB/XII/CSC/1
int n;
public;
int num() {
n=4;
}
void display(){
cout<<n;
}
18. Give the format of derived class declaration with an example. 2
19. What is a data structure? Give one example of non linear data structure. 2
20. Write an algorithm to push element into the stack. 2
21. What is the use of UPDATE command? 2
22. Draw a logical Circuit Diagram for the following Boolean Expression:
X’.(Y’+Z) 2
23. Why are Computer Viruses also called viruses? 2
24. What is polymorphism? Give a suitable example of the same. 4
25. Explain different ways to declare member functions in C++ with suitable
example. 4
26. a. Write a program to demonstrate overloading Constructor with array of class
object.
OR 4
b. Write some of the special characteristics of destructors.
27. a. What is visibility modes in class derivations? What are those modes?
OR 4
b. Explain the different types of inheritance.
28. a. The following numbers : (89, 20, 31, 56, 20, 64, 48) are required to be sorted
using bubble sort. Show how the list would appear at the end of each pass?
OR 4
b. Considering the following key set : 42, 29, 74, 11, 65, 58. Use insertion sort
to sort the data in ascending order and indicate the sequences of steps
required.
29. a. Evaluate the following postfix expression using stack and show the contents
of stack after execution of each step. 50, 40, +, 18, 14, -, 4, *, +
Page 3
-3- NB/XII/CSC/1
b. Obtain the postfix notation for the following infix notation of expression
showing the contents of the stack and postfix expression formed after each
step of conversion: A*B+(C-D/F)
30. Write the SQL for (a) ,(b) and write the output of (c),(d) on the basis of
the table TEACHER: 4
NO. NAME Age Department Dateofjoin Salary Sex
1 Jugal 34 Computer 10/01/97 12000 M
2 Sharmila 31 History 24/03/98 20000 F
3 Sandeep 32 Maths 12/12/96 30000 M
4 Sangeeta 35 History 01/07/99 40000 F
5 Rakesh 42 Maths 05/09/97 25000 M
6 Shyam 50 History 27/06/98 30000 M
7 Shiv Om 44 Computer 25/02/97 21000 M
(a) To show all information about the teacher of History department
(b) To count the number of teachers with age greater than 32.
(c) Select MAX(age) from TEACHER where Sex=”M”;
(d) Select AVG(Salary) from TEACHER WHERE Sex=”F”;
31. Obtain a simplified form for the Boolean expression: 4
F(a,b,c,d) = ∑(4, 5, 6, 7, 9, 11, 12, 13, 14, 15) using Karnaugh map method.
32. a. What is URL? How do absolute and relative URLs differ?
b. What is the difference between Message Switching technique and Packet
Switching technique?
************************