PSC HSST Computer Science Model Questions and Answers – Part 6
HSST Computer Science Model Questions and Answers – Part 6
Code: 188/2006
Exam: HSST Computer Science
HSST Computer Science Model Questions and Answers – Part 1
HSST Computer Science Model Questions and Answers – Part 2
PSC HSST Computer Science Model Questions and Answers – Part 3
PSC HSST Computer Science Model Questions and Answers – Part 4
PSC HSST Computer Science Model Questions and Answers – Part 5
1. Which one of the following regular expressions is NOT equivalent to the regular expression (a+b+c)*
(A) (a*+b*+c*)* (B) (a*b*c*)*
(C) ((ab)*+c*)* (D) (a*b*+c*)*
Answer: C
2. The relation R defined on the set A={1,2,3,4} by {(1,1),(2,2),(3,3),(4,4)} is
(A) Reflexive (B) Symmetric
(C) Transitive (D) All of the above
Answer: D
3. Suppose that P(x,y) means ‘x is parent of y’ and M(x) means ‘x is male’. If (v,w) equals M(v)Ù$x$yP(x,y) Ù P(x,v) Ù (y¹v) Ù P(y,w))
What is the meaning of expression F(v,w)?
(A) v is brother of w (B) v is nephew of w
(C) v is an uncle of w (D) v is grandfather of w
Answer: C
4. Context Sensitive Grammar can be recognized by a
(A) Finite state machine (B) Push down automata
(C) Deterministic PDM (D) Linearly bounded memory machine
Answer: D
5. The Boolean function x’y’+xy+x’y
(A) x’+y’ (B) x+y
(C) x’+y (D) x+y’
Answer: C
6. A register organized to allow moving left or right operations is called a
(A) Shift register (B) Counter
(C) Loader (D) Adder
Answer: A
7. De Morgan’s theorem states that NAND gate is equivalent to a bubbled …………. gate.
(A) AND (B) XAND
(C) XOR (D) OR
Answer: D
8. Standard TTL has a multiple emitter input transistor and a ………….. output.
(A) Totem-pole (B) Register
(C) Bipolar (D) Transistor
Answer: A
9. What is the 2’s complement of –24 in a 16-bit microcomputer?
(A) 1111 1111 1110 0111 (B) 1111 1111 1110 1000
(C) 0000 0000 0001 1000 (D) 1000 1000 0001 1000
Answer: B
10. Which of the following logic families has the highest noise immunity?
(A) TTL (B) DTL
(C) RTL (D) HTL
Answer: D
11. Overload function in C++
(A) A group of function with the same name
(B) All have the same number and type of arguments
(C) Functions with same name and same number and type of arguments
(D) All of the above
Answer: A
12. A constructor is called whenever
(A) An object is used (B) An object is declared
(C) A class is declared (D) A class is used
Answer: B
13. The differences between constructor and destructor are
(A) Constructors can take arguments but destructor can’t
(B) Constructors can be overloaded but destructors can’t be overloaded
(C) both (A) and (B)
(D) none of these
Answer: C
14. A class having no name
(A) is not allowed (B) can’t have a destructor
(C) Can’t have constructor (D) can’t be passed as an argument
Answer: B
15. In C++ a function contained within a class is called
(A) A member function (B) An operator
(C) A class function (D) A method
Answer: A
16. Which one of the following are essential features of an object oriented programming language?
(i) Abstraction and encapsulation
(ii) Strictly-typed ness
(iii) Type-safe property coupled with sub-type rule
(iv) Polymorphism in the presence of inheritance
(A) (i) and (ii) only (B) (i) and (iv) only
(C) (i), (ii) and (iv) only (D) (i), (iii) and (iv) only
Answer: B
17. Which of the following is not a logical database structure?
(A) Relational (B) Network
(C) Tree (D) Chain
Answer: D
18. Which of the following SQL statement is not a Data Manipulation Language statement?
(A) CREATE (B) SELECT
(C) INSERT (D) UPDATE
Answer: A
19. The way an application views the data from the database that the application uses is a
(A) Data model (B) Schema
(C) Sub schema (D) None of the above
Answer: C
20. Which of the following is not a characteristic of a relational database model?
(A) Tables (B) Treelike structure
(C) Records (D) Complex logical relationships
Answer: D
21. Which normal form is considered adequate for normal relational database design?
(A) 5 NF (B) 4 NF
(C) 3 NF (D) 2 NF
Answer: C
22. In write-locks-all distributed database concurrency control strategy
(A) A transaction is said to have read-lock on item A whenever it has a read lock on any copy of A
(B) A transaction is said to have write-lock on A whenever it has write locks on all copies of A
(C) A transaction is said to have write-lock on item A whenever it has a write lock on any copy of A
(D) Both (A) and (B)
Answer: C
23. Which of the following algorithms has running time q(n2) in the worst case but q(n logn) on average?
(A) Bubble sort (B) Quick sort
(C) Heap sort (D) Merge sort
Answer: B
24. A binary search tree contains the numbers 1,2,3,4,5,6,7,8. When the tree is traversed in pre-order and the values in each node printed out, the sequence of values obtained is 5,3,1,2,4,6,8,7. If the tree is traversed in post-order, the sequence obtained would be
(A) 8,7,6,5,4,3,2,1 (B) 1,2,3,4,8,7,6,5
(C) 2,1,4,3,6,7,8,5 (D) 2,1,4,3,7,8,6,5
Answer: D
25. In a depth-first traversal of a graph G with n vertices, k edges as marked as tree edges. The number of connected components in G is
(A) k (B) n-k-1
(C) n-k (D) k+1
Answer: B