Page 1
MSc(HS)(Computer Science)
1. For implementing C++ programs, which of the following is considered the most common
way?
A) C++ programs are directly compiled into native code by a compiler.
B) C++ programs are first compiled to intermediate code by a compiler and then
executed by a virtual machine.
C) C++ programs are interpreted by an interpreter.
D) C++ directly compiles and executes the program.
2. If class P is friend of class Q and class Q is friend of class R in a C++ program, which of
the following is true?
A) Class R is friend of class P.
B) Class P is friend of class R.
C) Class P and Class R do not have any friend relationship.
D) All are friends.
3. In a group of nested loops in C/C++, which loop is executed the maximum number of
times?
A) Cannot be determined
B) All loops are executed same number of times
C) The outermost loop
D) The innermost loop
4. What is the output of following C++ program?
int var1 = 25;
int main()
{
int var1 = 70;
cout << var1 << ::var1;
}
A) Syntax error
B) 2570
C) 70 25
D) 70 70
5. In context of C++, following is an example of _____________________________ .
class derived: public base1, public base2 { }
A) Polymorphic inheritance
B) Multilevel inheritance
C) Hierarchical inheritance
D) Multiple inheritance
6. When new data items are to be inserted into a data structure, but there is no available
space; this situation is usually known as _____________ .
A) Houseful B) Saturated C) Underflow D) Overflow
Page 2
7. Which of the following is the most quickly accessible storage to processors?
A) RAM B) Registers C) Disks D) Pen Drive
8. Which logic gate is indicated by the following truth table?
A B X
0 0 0
0 1 1
1 0 1
1 1 0
A) Exclusive NOR B) Exclusive OR
C) NAND D) OR
9. In the relational model of database systems, relationships between tables are created using
____________ .
A) Composite keys B) Determinants
C) Candidate keys D) Foreign keys
10. In mobile communication, a ____________________ is responsible for connecting cells,
recording call information, billing etc.
A) Cell B) Base Station (BS)
C) Mobile Station (MS) D) Mobile Switching Centre (MSC)
11. In web applications, JavaScript is used to _____________________________ .
A) Style html pages
B) Execute query related to database on server
C) Add interactivity to a web page
D) Perform server side operations
12. Which HTML tag inserts a line horizontally on your web page?
A) <tr> B) <hr>
C) <line> D) <line direction=”horizontal”>
13. Which of the following is not a major type of Cloud Computing?
A) Hardware as a Service (HaaS) B) Platform as a Service (PaaS)
C) Software as a Service (SaaS) D) Infrastructure as a Service (IaaS)
14. What will be printed by the following C++ program?
void fun1 (int *b)
{
*b = 1;
}
int main ()
{
Page 3
int *a;
int n;
a = &n;
*a = 0;
fun1 (a);
cout << *a << endl;
}
A) 0 B) 1 C) The address of a D) The address of n
15. In the context of e-mails, ‘spam’ is ______________________________________.
A) The act of overloading an e-mail server by using denial-of-service attacks
B) An e-mail message that is infected with viruses
C) A large quantity of messages that do not reach the recipients
D) Unsolicited advertising sent to a large number of recipients
16. The data storage hierarchy consists of ____________________________________ .
A) bits, bytes, fields, records, files and databases
B) bits, bytes, records, fields, files and databases
C) bits, bytes, fields, files, records and databases
D) bytes, bits, fields, records, files and databases
17. Which of the following statement(s) is/are TRUE?
S1: The decimal number 10 is larger than the hexadecimal number 10.
S2: In the binary number 1110.101, the fractional part has the decimal value as 0.625.
A) SI only B) S2 only
C) Both S1 and S2 D) Neither S1 nor S2
18. The file extensions such as gif, jpg, bmp, png are used to store_____________ .
A) Text data B) Audio data C) Image data D) Video data
19. Encoding or scrambling data for transmission across a network is known as_________.
A) Decryption B) Protection C) Detection D) Encryption
20. The first generation of computers was characterized by _____________________ .
A) Microprocessors B) Integrated circuits
C) Transistors D) Vacuum tubes
21. __________________ is known as father of World Wide Web (WWW).
A) Jim Clark B) Ted Nelson C) Tim Berner Lee D) Tim Thompson
22. A client machine usually needs ____________ to send e-mails.
A) Only SMTP B) Only POP
C) Both SMTP and POP D) Neither SMTP nor POP
23. User Datagram Protocol (UDP) needs _______________ address to deliver the user
datagram to the correct application program.
Page 4
A) Port B) Application C) Internet D) Physical
24. Identify the class of IP address 219.8.7.6.
A) Class A B) Class B C) Class C D) Class D
25. In data communications, ATM is an acronym for ___________________________ .
A) Automated Teller Machine
B) Asynchronous Transfer mode
C) Automatic Transmission Model
D) Asynchronous Telecommunication Method
26. At data link layer, flow control is required to prevent _______________
A) Bit errors B) Overflow of sender buffer
C) Overflow of receiver buffer D) Collision between sender and receiver
27. In data communication, which error detection method involves polynomials?
A) Simple parity check B) Two-dimensional parity check
C) Checksum D) Cyclic Redundancy Check (CRC)
28. The infix expression (A * B + C) is correctly represented in postfix notation as
______________ .
A) A B C * + B) A B C + * C) A B * C + D) A B + C *
29. The result of addition (167)8 + (250)8 is ____________ .
A) 4378 B) 3138 C) 2878 D) 4178
30. A relational table is said to be in the ___________________________ , if there is no
transitive functional dependency.
A) First Normal Form (1NF) B) Second Normal Form (2NF)
C) Third Normal Form (3NF) D) Fourth Normal Form (4NF)
31. If a host is assigned IP address 222.45.97.67 and the subnet mask 255.255.255.224, what
is the subnet address?
A) 222.45.97.32 B) 222.45.97.65 C) 222.45.97.12 D) 222.45.97.64
32. Suppose an image is to be displayed in a web page to cover 25% of the browser window
horizontally and 35% vertically. The _____ and ______ attributes of the <img> tag will
be used respectively for this.
A) Width, Height B) Height, Width C) Width, Length D) Height, Length
33. What will be the output of following C program?
# include <stdio.h>
int main( )
{
int i = 2;
Page 5
for(i = 0; 0; i < 3)
printf("\n %d", i);
printf("\t Computer");
}
A) 2 2 B) 0 Computer C) 0 1 2 Computer D) Computer
34. _______________ is a wireless technology that connects devices for exchanging data
over very short distances using short-wavelength radio waves.
A) Wi-Fi B) Bluetooth C) Infrared D) Ultraviolet
35. Convert the following :
(11010101)2 = (............)8
A) 325 B) 326 C) 652 D) 625
36. For singly linked list of length n, ______________ number of comparisons are needed
to search for a given element in the worst case.
R
A) log2 n B) C) n log2 n D) n
37. If Q means ‘add to’, J means ‘multiply by’, T means ‘subtract from’ and K means
‘divide by’, then
40 K 2 Q 3 J 6 T 7 = ?
A) 18 B) 28 C) 31 D) 133
38. In a lottery, there are 15 prizes and 30 blanks. A lottery is drawn at random. What is the
probability of getting a prize?
A) . B) C) . D) 7
39. What would be the correct sequence of steps for software development process?
i. Test ii. Design iii. Install
iv. Specification v. Manufacture vi. Maintain
A) ii, iv, v, i, vi, iii B) iv, ii, v, i, iii, vi
C) ii, iv, v, i, iii, vi D) iv, ii, v, i, vi, iii
40. Consider the following Java code:
public final class two extends one
{
// ...
}
What is the meaning of "final" in the declaration of class two above?
A) This is the final version of class one, which should be used if multiple versions
are present
B) Class one need not to be instantiated to invoke its methods in class two
C) No method of class one can be overridden
D) Two cannot be sub-classed
Page 6
41. A DNS server translates __________ of another computer into ________ and vice versa.
A) Domain name, IP address B) Host address, domain name
C) Domain name, server address D) Server name, IP address
42. In context of an operating system, _________ refers to a situation in which a process is
ready to execute but is continuously denied access to a processor in deference to other
processes.
A) Synchronization B) Mutual exclusion
C) Dead lock D) Starvation
43. Assume every process requires 4 seconds of service time in a system with single
processor. If new processes are arriving at the rate of 5 processes per minute, then
estimate the fraction of time CPU is busy in system?
A) 66% B) 33% C) 50% D) 20%
44. In database management systems, __________ level of abstraction describes how the
data is actually stored in memory.
A) Conceptual B) View C) Physical D) External
45. A graph is a collection of nodes, called ___________ and line segments called
___________ which connect pair of nodes.
A) Vertices, edges B) Edges, vertices
C) Vertices, paths D) Graph point, edges
46. Which of the following best describes the process of data streaming?
A) Playing multimedia file after complete download of a file
B) Playing multimedia file without being completely downloaded first
C) Reducing the load time of a Web page
D) Sending packets to a Web server to improve its performance
47. In animation, a ________ is a frame in which the artwork differs significantly from that
of the previous frame.
A) Lock frame B) Tweening C) Key frame D) Cell
48. Which of the following refers to e-waste?
A) Waste from nuclear generation B) Discarded electronic appliances
C) Eco-freiendly waste D) Hazardous chemical waste
49. Which one of the following is not one of the major types of e-commerce?
A) B2B B) B2C C) C2B D) C2C
50. The Secure Electronic Transaction (SET) protocol is used for ______________.
A) Credit card payment
B) Cheque payment
C) Electronic cash payments
Page 7
D) Payment of small amounts for internet services
51. In Unix/Linux, ________________ permission is assigned by the following command
chmod 754 myfile.txt
A) -rwxrw-r- - B) –rwxr--r- x
C) -rwxr-xr- - D) –rw-rw-r- x
52. In _______________ disk scheduling policy, when the last track has been visited in one
direction, the arm is returned to the opposite end of the disk and the scan begins again.
A) Last in first out B) Shortest service time first
C) SCAN D) Circular SCAN
53. Memory management technique in which system stores and retrieves data from
secondary storage for use in main memory is called___________.
A) Fragmentation B) Paging
C) Mapping D) Buffering
54. The result of an arithmetic and logical operation is stored in ______________,
A) Accumulator B) Cache Memory
C) ROM D) Instruction Registry
55. The unit which decodes and translates each instruction and generates the necessary
signals for ALU and other units is called ____________________________ .
A) ALU B) Control Unit C) CPU D) Logical Unit
56. The performance of the cache memory is measured in terms of ____________________ .
A) Hit ratio B) Chat ratio C) Copy ratio D) Data ratio
57. Inserting an item into the stack when stack is not full is called _____________ operation
and deletion of item form the stack, when stack is not empty is called ____________
operation.
A) Push, pop B) Pop, push C) Insert, delete D) Delete, insert
58. In the ___________________ traversal of a graph, we process all the descendants of a
vertex before we move to an adjacent vertex.
A) Breadth First B) With First C) Depth First D) Depth Limited
59. _______________________ is considered the first step in software project planning.
A) Determining the budget
B) Establishing the objectives and scope
C) Selecting a team organizational model
D) Determining the project constraints
60. For software, Acceptance tests are normally conducted by the __________________ .
Page 8
A) Developers B) Test team C) System engineers D) End users
61. In SQL, which of the following is not a Data Definition Language (DDL) command?
A) RENAME B) DROP C) ALTER D) UPDATE
62. Which of the following SQL statements is correct?
A) SELECT Username AND Password FROM Users
B) SELECT Username AND Password WHERE Username = 'user1'
C) SELECT Username, Password FROM Users
D) SELECT Username, Password WHERE Username = 'user1'
63. Which of the following is non-liner data structure?
A) Stacks B) List C) Strings D) Trees
64. The best case time complexity of quick sort is expressed as ________________ .
A) O(n) B) O(n2) C) O(n log n) D) O(log n)
65. What is the output of following C program?
void main()
{
int a=b=c=10;
printf(“\n %d %d %d”,a,b,c); }
A) 10 10 10 B) 0 0 0
C) Compile Time Error D) Three Garbage Values
66. What will be the output of following C code snippet?
#define SQUARE(X) (X * X)
int main ( )
{
printf (“Square = %d” , SQUARE(12) );
}
A) Square= 144 B) Square= 32 C) Square= 104 D) Square= 12
67. In C, a function returns a value of type _________ by default.
A) Int B) Char C) Float D) Void
68. In C, a static integer variable by default gets initialized to __________ .
A) 0 B) 1 C) Blank space D) Garbage value
69. If an expression contains relational, assignment and arithmetic operators in C. If
parenthesis are not present, the order of evaluation will be _________
A) Assignment, arithmetic, relational B) Relational, arithmetic, assignment
C) Assignment, relational, arithmetic D) Arithmetic, relational, assignment
70. In SQL, a _____________ is a virtual table based on the result-set of a 'Select' statement.
A) Synonym B) View C) Sequence D) Transaction
Page 9
71. Which of the following collection class of VB.NET represents a last-in, first out
collection of objects?
A) ArrayList B) Hashtable C) SortedList D) Stack
72. Which of the following PHP statement/statements will store 111 in variable num?
I. int $num = 111;
II. int num = 111;
III. $num = 111;
A) Both I and II B) Only II C) Only III D) Only I
73. In Java, which of these methods can be used to output a sting in an applet?
A) Display() B) Print() C) Showstring() D) Drawstring()
74. Which one is a valid declaration of a Boolean in Java?
A) Boolean b1 = 1; B) Boolean b2 = ‘false’;
C) Boolean b3 = false; D) Boolean b4 = ‘true’;
75. Which of these keywords is used to generate an exception object explicitly in Java?
A) Try B) Finally C) Throw D) Catch
x-x-x