CS 2puc Mid2023

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

COMPUTER SCIENCE – 2 PUC

Midterm Examination October, 2023


Time: 3:15 Hrs. Max. Marks: 70
PART – A
Answer all the questions, each question carries one mark. 20 * 1 = 20 marks
I. Select the correct answer from the choices given.
1. Where is L1 cache located?
(a) Inside the CPU (b) Outside the CPU (c) In the motherboard (d) In the RAM

2. Which of the following is not an I/O port?


(a) Serial Port (b) Parallel Port (c) USB Port (d) ISA Port

3. Which of the following operation performed by NOT operator?


(a) Logical addition (b) Complementation
(c) Logical multiplication (d) Logical Subtraction

4. Dual form of 1+0 is -


(a) 1.0 (b) 0+1 (c) 0.1 (d) 0+1

5. For the truth table given below, what type of logic gate does the output F represents?
A B F
0 0 0
0 1 1
1 0 1
1 1 0
(a) XOR (b) XNOR (c) NAND (d) NOR

6. Following NAND gate realises (derives) ______ gate.


(a) NOT
(b) AND
(c) OR
(d) NOR

7. Assertion (A): A stack is a LIFO data structure.


Reasoning (R): An ordered collection of items where insertion and deletion takes place
at different ends.
(a) A is true, R is False (b) A is true, R is correct explanation
(c) A is false, R is False (d) None of the above

1
8. Which of the following is a primitive data structure?
(a) Array (b) Tree (c) Linked list (d) int

9. _____ operator is used to define member function outside the class.


(a) Dot (.) (b) Scope resolution (::) (c) Semicolon (;) (d) Asterisk (*)

10. Given the class –


class Add
{ int sum;
private: int num1, num2;
public: void Process( )
{
sum=num1+num2;
}
};

(a) sum – Public, num1 and num2 – Private


(b) sum – Protected, num1 and num2 - Private
(c) sum, num1 and num2 - Private
(d) None of the above

11. A) The inline function is a compact function


B) Inline function runs faster than normal function
C) Using inline function efficient code can be generated

(a) Both A and B are correct (b) Both A and C are correct
(c) Both B and C are correct (d) All A,B and C are correct

12. Which of the following function have same name, but different in the number of
arguments or data type of arguments?
(a) Inline function (b) Overloaded function (c) Friend function (d) Recursive function

13. Constructor should be declared in ____


(a) Private (b) Protected (c) Public (d) All the above

14. Which of the following is not overloaded?


(a) Default constructor (b) Parameterised constructor
(c) Copy constructor (d) None of the above

15. Which of the following is advantage of inheritance?


(a) Reusing existing code (b) Faster development time
(c) Easy to maintain program (d) All of the above

2
II. Fill in the blanks choosing appropriate word. ( Class, Destructor, Processor Socket,
Graph, Universal)
16. _______ is a rectangular connector into which the processor is mounted.
17. NAD and NOR gates are called ______ gates.
18. _____ is a non-linear data structure.
19. _____ is a way of grouping objects of similar characteristics.
20. ______ cannot be overloaded.

PART – B
III. Answer any four questions. Each question carries two marks. 4 * 2 = 8 marks
21. Write any two basic postulates of Boolean algebra.
22. What is minterm and maxterm?
23. Write the gate symbol and truth table for NOT gate.
24. Prove that X(X’+Y)=XY
25. Define abstraction and encapsulation.
26. Mention different types of overloading.
27. Give the syntax and example for constructor.
28. When is copy constructor used in a program?

PART- C
IV. Answer any four questions. Each question carries three marks. 4 * 3 = 12 marks
29. Explain various characteristics of a motherboard.
30. Write a note on USB.
31. Explain: a) Address Bus b) Control Bus c) Data Bus
32. Obtain minterm expression (SOP) for the Boolean function F=X+YZ
33. Realise basic gates using NOR gate.
34. Write an algorithm for traversal in a linear array.
35. Explain memory representation of stack using one dimensional array.
36. Explain any three types of queue.

PART- D
V. Answer any four questions. Each question carries five marks. 4 * 5 = 20 marks
37. Write an algorithm for insertion sort.
38. What is primitive data structure? Explain different operations to be performed on
primitive data structure.
39. Mention any five applications of queue.
40. Write the advantages of Object Oriented Programming.
41. Differentiate between Procedure Oriented Programming (POP) and Object Oriented
Programming (OOP).
42. Explain inline function with a programming example.
43. What are the rules for writing a constructor function?
44. Explain different types of inheritance.

3
PART – E
VI. Answer any two questions. Each question carries five marks. 2 * 5 = 10 marks
45. Given the Boolean function F(ABCD)=(0,1,2,3,6,8,10,12,14). Reduce it using K-map.
46. Mention De Morgan’s Law. Prove any one law.
47. Explain member function inside the class definition with a programming example.

*********

You might also like