PSC HSST Computer Science Model Questions and Answers – Part 6
26. The tightest lower bound on the number of comparisons, in the worst case, for comparison-based sorting is of the order of
(A) n (B) n2
(C) n logn (D) n2 logn
Answer: A
27. How many distinct binary search trees can be created out of 4 distinct keys?
(A) 5 (B) 24
(C) 42 (D) 14
Answer: D
28. The following numbers are inserted into an empty binary search tree in the given order: 10,1,3,5,15,12,16. What is the height of the binary search tree (the height is the maximum distance of a leaf node from the root)?
(A) 3 (B) 4
(C) 5 (D) 6
Answer: A
29. A queue is implemented using linked list with two pointers, front and rear. The time needed to insert element in a queue of length n is
(A) O(n) (B) O(1)
(C) O(logn) (D) O(n logn)
Answer: B
30. The depth of a complete binary tree with ‘n’ nodes is
(A) log(n+1)-1 (B) log(n)
(C) log(n-1)+1 (D) log(n)+1
Answer: A
31. Linked lists are not suitable for
(A) Insertion sort (B) binary search
(C) Polynomial manipulation (D) Radix sort
Answer: B
32. Algorithm, which solves the all-pair shortest path problem, is
(A) Dijkstra’s algorithm (B) Prim’s algorithm
(C) Floyd’s algorithm (D) Warshall’s algorithm
Answer: B
33. Which of the following statements about Ethernets is typically FLASE?
(A) Ethernets use circuit switching to send messages
(B) Ethernets use buses with multiple masters
(C) Ethernet protocols use a collision-detection method to ensure that messages are transmitted properly
(D) Networks connected by Ethernets are limited in length to a few hundred meters
Answer: A
34. In the Internet Protocol (IP) suite of protocols, which of the following best describes the purpose of the Address Resolution Protocol?
(A) To translate Web addresses to host names
(B) To determine the hardware address of a given IP address
(C) To determine the hardware address of a given host name
(D) To determine the IP address of a given host name
Answer: B
35. Which of the following statements about datagrams sent by a node in a network using Ipv4 protocol is (are) true?
I. Datagrams at the source must be the size of the smallest maximum transmission unit(MTU) of all the links on a path to the destination
II. Datagrams may be fragmented during routing
III. Datagrams are reassembled only at the destination
(A) I only (B) II only
(C) III only (D) II and III
Answer: D
36. Which of the following statements about a remote procedure call is true?
(A) It is used to call procedures with addresses that are farther than 162 bytes away
(B) It cannot return a value
(C) It cannot pass parameters by reference
(D) It cannot call procedures implemented in a different language
Answer: C
37. A subnet has been assigned a subnet mask of 255.255.255.192. What is the maximum number of hosts that can belong to this subnet?
(A) 14 (B) 62
(C) 126 (D) 30
Answer: B
38. In a network of LANs connected by Bridges, packets are sent from one LAN to another through intermediate bridges. Since more than one path may exist between two LANs, packets may have to be routed through multiple bridges
(A) For a shortest path routing between LANs
(B) For avoiding loops in the routing paths
(C) For fault tolerance
(D) For minimizing collisions
Answer: B
39. Packets of the same session may be routed through different paths in
(A) TCP, but not UDP (B) UDP, but not TCP
(C) TCP and UDP (D) Neither TCP, nor UDP
Answer: B
40. Choose the standards for packet switched communication
(A) Open systems interconnection (B) ARCNET
(C) CCITT X.12 AND X.11 (D) CCITT X.25 AND X.21
Answer: D
41. A standard RS-232 signal is
(A) RTS (B) DSR
(C) CTS (D) All of the above
Answer: D
42. Which of the following networking device is an example of layer 3 (network layer) device?
(A) Router (B) Repeater
(C) Bridge (D) Hub
Answer: A
43. Which port is used by a TELNET communication session?
(A) 21 (B) 23
(C) 25 (D) 27
Answer: C
44. Which application allows a user to access and change remote files without actual file transfer?
(A) TELNET (B) DNS
(C) FTP (D) NFS
Answer: A
45. Which of the following is the name of the data structure in a compiler that is responsible for managing information about variables and their attributes?
(A) Abstract Syntax Tree(AST) (B) Attribute grammar
(C) Symbol table (D) Semantic Stack
Answer: C
46. Which of the following is an example of Top-down parser?
(A) Recursive descent parser (B) Shift reduce parser
(C) Both (A) and (B) (D) None of the above
Answer: A
47. Which of the following is not an example of code optimization technique?
(A) Common sub expression elimination (B) Dead code elimination
(C) Expression evaluation (D) Compile time evaluation
Answer: C
48. The interface chip used for data transmission between 8086 and 16-bit ADC is?
(A) 8255 (B) 8259
(C) 8253 (D) 8251
Answer: A
49. Which one of the following is true of TRAP interrupt in INTEL 8085?
(A) It is level triggered
(B) It is negative edge triggered
(C) It is positive edge triggered
(D) It is both positive and negative edges triggered
Answer: D
50. The most powerful parsing method is
(A) LL(1) (B) SLR
(C) LALR (D) Canonical LR
Answer: D