MSC Computer Science Question Paper Cusat
MSC Computer Science Question Paper Cusat
COMPUTER SCIENCE
#include<studio.h>
void main()
{
int k = 4;
float k = 4;
printf(“%d”,k)
}
#include<studio.h>
int main()
{
int i = 0;
int x = i++, y = ++i;
printf(“%d, %d\n”,x,y);
return 0;
(A) 0,2
(B) 0,1
(C) 1,2
(D) Undefined
#include<studio.h>
void main()
{
int x = 4, y , z;
y = --x;
z = x--;
printf(“%d%d%d”,x,y,x);
(A) 323
(B) 233
(C) 322
(D) 234
(A) Multiplying by 2
(B) Division by 2
(C) Adding by 2
(D) Subtracting by 2
8. What will be the output of the following C code?
#include <stdio.h>
void main()
{
int i = 0;
while (i< 10)
{
i++;
printf("hi\n");
while (i< 8)
{
i++;
printf("hello\n");
}
}
}
(A) 51
(B) 03
(C) 53
(D) 11
(A) s.b.[i];
(B) s.[i].b;
(C) s.b[i];
(D) s[i];
12. Which of the following data types is accepted while declaring bit-fields in C ?
(A) Char
(B) Float
(C) Double
(D) Struct
13. In C there are two groups of string functions defined in the header <string.h>. What
are they?
(A) First group names beginning with str; second group names beginning with
mem
(B) First group names beginning with str; second group names beginning with is
(C) First group names beginning with string; second group names beginning with
mem
(D) First group names beginning with str; second group names beginning with type
main()
{
fork();fork();printf("yes");
(A) only
(B) twice
(C) four times
(D) eight times
16. Reusability of code in C++ is achieved through
(A) Inheritance
(B) Polymorphism
(C) Encapsulation
(D) Both (A) and (B)
(A) insertion
(B) extraction
(C) greater than
(D) lesser than
18. A class that contains at least one pure virtual function is called as
(A) Encapsulation
(B) Inheritance
(C) Abstraction
(D) Polymorphism
23. If a function can perform more than 1 type of task, where the function name remains
same, which feature of OOP is used here?
(A) Encapsulation
(B) Inheritance
(C) Polymorphism
(D) Abstraction
1 extern int i;
2 int i;
#include <iostream>
using namespace std;
int x[100];
int main()
{
cout<< x[99] <<endl;
}
(A) Entity
(B) Attribute
(C) Relationship
(D) Database
(A) HLL
(B) DDL
(C) DML
(D) DCL
(A) tables
(B) rows
(C) attributes
(D) relations
(A) 1NF
(B) 2NF
(C) 3NF
(D) BCNF
EMP(emp_no,emp_name,dept_no,salary)
DEPT(dept_no,dept_name,location)
(A) Tree
(B) Relational
(C) Network
(D) Chain
39. For each attribute of a relation, there is a set of permitted values, called the
………….. of that attribute
(A) Domain
(B) Relation
(C) Set
(D) Schema
40. In SQL, the ………… clause allows us to select only those rows in the result relation
of the …………. clause that satisfy a specified predicate
41. Which of the join operations do not preserve non matched tuples?
42. What type of join is needed when you wish to include rows that do not have matching
values?
(A) Equi-join
(B) Natural join
(C) Outer join
(D) All of the above
43. The ………….. operation, denoted by −, allows us to find tuples that are in one
relation but are not in another
(A) Union
(B) Set-difference
(C) Difference
(D) Intersection
45. Which forms has a relation that possesses data about an individual entity?
(A) 2NF
(B) 3NF
(C) 4NF
(D) 5NF
(A) Loading
(B) Bulk insertion
(C) Bulk loading
(D) Increase insertion
(A) Backtracking
(B) Dynamic programming
(C) Divide and conquer
(D) Overflow
49. For merging two sorted lists of sizes m and n into a sorted list of size m + n, we
require comparisons of
(A) O(m)
(B) O(n)
(C) O(m + n)
(D) O(log(m) + log(n))
51. Elapsed time between initiating a query and receiving a response is called
(A) heights of left and right subtrees of the root or any other node except leaves
differ by atmost 1
(B) heights of left and right subtrees of the root differ by atleast 1
(C) heights of left and right subtrees of the root differ by atmost 1
(D) heights of left and right subtrees of the root or any other node except leaves
differ by atleast 1
53. A linear list of elements in which deletion can be done from one end (front) and
insertion can take place only at the other end (rear)is known as
(A) queues
(B) stacks
(C) trees
(D) dequeue
54. Which of the following is false about a doubly linked list?
56. What is the number of moves required to solve Tower of Hanoi problem for k disks?
(A) 2(k – 1)
(B) 2k + 1
(C) 2(k + 1)
(D) 2k – 1
57. If binary trees are represented in arrays, what formula can be used to locate a left
child, if the node has an index i?
(A) 2i + 1
(B) 2i + 2
(C) 2i – 1
(D) 2i – 2
(A)
(B)
(C)
(D)
61. Which of the following is the most widely used external memory data structure?
62. A B-tree of order 4 and of height 3 will have a maximum of ………… keys
(A) 255
(B) 63
(C) 127
(D) 188
63. The worst case complexity of deleting any arbitrary node value element from heap is
(A) O(log n)
(B) O(n)
(C) O(n log n)
2
(D) O(n )
64. The number of elements in the adjacency matrix of a graph having 7 vertices is
(A) 7
(B) 14
(C) 36
(D) 49
65. What is the maximum number of edges present in a simple directed graph with 7
vertices if there exists no cycles in the graph?
(A) 21
(B) 7
(C) 6
(D) 49
(A) *+ab+cd
(B) ab+*cd+
(C) abcd++*
(D) ab+cd+*
67. The worst and average case time complexities of Quicksort is as follows
68. If T (n) be defined by T (1) = 7 and T (n + 1) = 3n + T(n) for all integers n ≥ 1. Which
of the following represents the order of growth of T (n) as a function of n?
(A) Θ (n)
(B) Θ (n log n)
2
(C) Θ (n )
n
(D) Θ (2 )
69. Which of the following are arranged in increasing order of growth rates?
n 3
(A) 2 , log n, n , n log n
3 3
(B) n , n log n, log n, n
3 n
(C) log n, n log n, n , 2
n 3
(D) n log n, 2 , log n, n
70. A search procedure which associates an address with a key value and provides a
mechanism for dealing with two or more values assigned to the same address is called
71. Merge sort uses which of the following technique to implement sorting?
(A) Backtracking
(B) Greedy algorithm
(C) Divide and conquer
(D) Dynamic programming
72. Which of the following stable sorting algorithm takes the least time when applied to
an almost sorted array?
(A) RAM
(B) ROM
(C) CPU
(D) Memory Cache
(A) memory
(B) storage
(C) CPU utilization
(D) cost of computation
(A) Register
(B) Cache
(C) Main memory
(D) Disk
80. Fork is
(A) reenterable
(B) non reusable
(C) virtual memory
(D) cache memory
82. Semaphores
grep nd xyz | wc –l
(A) Combine both the files nd and xyz land count number of lines
(B) Count the number of characters in the file xyz
(C) Count the number of lines in the file xyz and nd
(D) Count the number of lines having the pattern nd in the file xyz
84. Which of the policy does not replace a page if it is not in the favored subset of a
process’s page?
(A) FIFO
(B) LRU
(C) Working set
(D) LFU
85. Which of the following is not a technique to avoid a collision?
86. RPC provides a(an) ……….. on the client side, a separate one for each remote
procedure
(A) Stub
(B) Identifier
(C) Name
(D) Process identifier
(A) if a process is executing in its critical section, then no other process must be
executing in their critical sections
(B) if a process is executing in its critical section, then other processes must be
executing in their critical sections
(C) if a process is executing in its critical section, then all the resources of the
system must be blocked until it finishes execution
(D) None of the above
92. Every time a request for allocation cannot be granted immediately, the detection
algorithm is invoked. This will help identify
93. Every address generated by the CPU is divided into two parts. They are
(A) Internal
(B) External
(C) either type of
(D) None of the above
95. In paged memory systems, if the page size is increased, then the internal
fragmentation generally
96. When device A has a cable that plugs into device B, and device B has a cable that
plugs into device C and device C plugs into a port on the computer, this arrangement
is called a …………
(A) port
(B) daisy chain
(C) bus
(D) cable
97. The hardware mechanism that allows a device to notify the CPU is called
(A) Polling
(B) Interrupt
(C) Driver
(D) Controlling
100. Which file is a sequence of bytes organized into blocks understandable by the
system’s linker?
(A) 1
(B) 2
(C) 3
(D) 4
102. Find which one would complete the series
(A)
(B)
(C)
(D)
(A) 1
(B) 2
(C) 3
(D) 4
104. Find out which of the figure (a), (b), (c), (d) can be formed from the pieces given in
fig. (X)
(A)
(B)
(C)
(D)
105. Choose the alternative which is closely resembles the mirror image of the given
combination
(A) 1
(B) 2
(C) 3
(D) 4
106. Find which one would complete the series
(A)
(B)
(C)
(D)
(A)
(B)
(C)
(D)
108. Choose the picture that would go in the empty box so that the two bottom pictures are
related in the same way as the top two are related
(A) 1
(B) 2
(C) 3
(D) 4
109. Identify the figure that completes the pattern
(A)
(B)
(C)
(D)
(A)
(B)
(C)
(D)
111. In certain language, MADRAS is coded as NBESBT, how is BOMBAY coded in that
code
(A) CPNCBZ
(B) CPNCBX
(C) DPNCBZ
(D) DPNCBX
112. If JOSEPH is coded as FKOALD, then GEORGE will be coded as
(A) HAKNCA
(B) CBKNCA
(C) CAKNCA
(D) CALNCA
(A) EDRIRL
(B) DCQHQK
(C) DEQJQM
(D) FYOBOC
114. In a certain code, THEN is coded as VFGL. How the WORD may be coded ?
(A) UQPF
(B) YMTB
(C) YMVB
(D) VQFP
115. If A = 4, K = 3, N = 2, P = 1, then the sum of which set of the letters makes the
highest number ?
(A) KANPK
(B) NPAKN
(C) PKANA
(D) NAKNA
116. If train is called bus, bus is called tractor, tractor is called car, car is called scooter,
scooter is called bicycle, bicycle is called moped, which is used to plough a field ?
(A) Train
(B) Bus
(C) Tractor
(D) Car
117. ‘man’ is coded as ‘woman’, ‘woman’ is coded as ‘girl’, ‘girl’ is coded as ‘boy’, ‘boy’
is coded as ‘worker’ then 6 year female is known as ?
(A) woman
(B) girl
(C) man
(D) boy
118. If the code of ‘HIGH’ is ‘8978’, then what will be decode for ‘4516’ ?
(A) FEAD
(B) DEAF
(C) BACH
(D) JADE
119. Rearrange the following parts (1, 2, 3 and 4) in proper sequence to obtain a correct
sentence
1. its best
2. is simply
3. science
4. the common sense at
(A) 1, 2, 4, 3
(B) 4, 2, 1, 3
(C) 2, 3, 4, 1
(D) 3, 2, 4, 1
(A) I
(B) mine
(C) me
(D) myself
(A) act
(B) perform
(C) operate
(D) behave
(A) Red
(B) Blue
(C) Green
(D) White
123. Pick the odd man out
(A) Preprocessor
(B) Header File
(C) Macros
(D) Compiler
(A) January
(B) August
(C) June
(D) December
125. Choose the pair that best represents a similar relationship to the one expressed in the
original pair of words
SIAMESE : CAT
126. Read the definition and all four choices carefully, and find the answer that provides
the best example of the given definition
Posthumous Publication occurs when a book is published after the author's death.
Which situation below is the best example of Posthumous Publication?
(A) Richard's illness took his life before he was able to enjoy the amazing early
reviews of his novel
(B) Melissa's publisher cancels her book contract after she fails to deliver the
manuscript on time
(C) Clarence never thought he'd live to see the third book in his trilogy published
(D) Elizabeth is honored with a prestigious literary award for her writing career
and her daughter accepts the award on behalf of her deceased mother
(A) OLPA
(B) KLMA
(C) LLMA
(D) KLLA
128. The following question presents a situation and asks you to make a judgment
regarding that particular circumstance. Choose an answer based on given information.
Eileen is planning a special birthday dinner for her husband's 35th birthday. She
wants the evening to be memorable, but her husband is a simple man who would
rather be in jeans at a baseball game than in a suit at a fancy restaurant. Which
restaurant below should Eileen choose?
(A) Alfredo's offers fine Italian cuisine and an elegant Tuscan decor. Patrons will
feel as though they've spent the evening in a luxurious Italian villa
(B) Pancho's Mexican Buffet is an all-you-can-eat family style smorgasbord with
the best tacos in town
(C) The Parisian Bistro is a four-star French restaurant where guests are treated
like royalty. Chef Dilbert Olay is famous for his beef bourguignon
(D) Marty's serves delicious, hearty meals in a charming setting reminiscent of a
baseball club house in honor of the owner,Marty Lester, a former major league
baseball all-star
129. The following question presents a situation and asks you to make a judgment
regarding that particular circumstance. Choose an answer based on given information.
The school principal has received complaints from parents about bullying in the
school yard during recess. He wants to investigate and end this situation as soon as
possible, so he has asked the recess aides to watch closely. Which situation should the
recess aides report to the principal?
(A) A girl is sitting glumly on a bench reading a book and not interacting with her
peers
(B) Four girls are surrounding another girl and seem to have possession of her
backpack
(C) Two boys are playing a one-on-one game of basketball and are arguing over
the last basket scored
(D) Three boys are huddled over a handheld video game, which isn't supposed to
be on school grounds
130. The following question presents a situation and asks you to make a judgment
regarding that particular circumstance. Choose an answer based on given information.
Mark is working with a realtor to find a location for the toy store he plans to open in
his town. He is looking for a place that is either in, or not too far from, the center of
town and one that would attract the right kind of foot traffic. Which of the following
locations should Mark's realtor call to his attention?
(A) a storefront in a new high-rise building near the train station in the center of
town whose occupants are mainly young, childless professionals who use the
train to commute to their offices each day
(B) a little shop three blocks away from the town's main street, located across the
street from an elementary school and next door to an ice cream store
(C) a stand-alone storefront on a quiet residential street ten blocks away from the
town's center
(D) a storefront in a small strip mall located on the outskirts of town that is also
occupied by a pharmacy and a dry cleaner
131. The following question presents a situation and asks you to make a judgment
regarding that particular circumstance. Choose an answer based on given information.
Rita, an accomplished pastry chef who is well known for her artistic and exquisite
wedding cakes, opened a bakery one year ago and is surprised that business has been
so slow. A consultant she hired to conduct market research has reported that the local
population doesn't think of her shop as one they would visit on a daily basis but rather
a place they'd visit if they were celebrating a special occasion. Which of the following
strategies should Rita employ to increase her daily business?
(A) making coupons available that entitle the coupon holder to receive a 25%
discount on wedding, anniversary, or birthday cakes
(B) exhibiting at the next Bridal Expo and having pieces of one of her wedding
cakes available for tasting
(C) placing a series of ads in the local newspaper that advertise the wide array of
breads
(D) moving the bakery to the other side of town
132. Direction: Read the question carefully and choose the correct answer.
Four defensive football players are chasing the opposing wide receiver, who has the
ball. Calvin is directly behind the ball carrier. Jenkins and Burton are side by side
behind Calvin. Zeller is behind Jenkins and Burton. Calvin tries for the tackle but
misses and falls. Burton trips. Which defensive player tackles the receiver?
(A) Burton
(B) Zeller
(C) Jenkins
(D) Calvin
133. Direction: Read the question carefully and choose the correct answer.
A four-person crew from Classic Colors is painting Mr. Field's house. Michael is
painting the front of the house. Ross is in the alley behind the house painting the back.
Jed is painting the window frames on the north side, Shawn is on the south. If Michael
switches places with Jed, and Jed then switches places with Shawn, where is Shawn?
134. Direction: Read the question carefully and choose the correct answer.
As they prepare for the state championships, one gymnast must be moved from the
Level 2 team to the Level 1 team. The coaches will move the gymnast who has won
the biggest prize and who has the most experience. In the last competition, Roberta
won a bronze medal and has competed seven times before. Jamie has won a silver
medal and has competed fewer times than Roberta. Beth has won a higher medal than
Jamie and has competed more times than Roberta. Michele has won a bronze medal,
and it is her third time competing.
(A) Roberta
(B) Beth
(C) Michele
(D) Jamie
135. Direction: Read the question carefully and choose the correct answer.
The high school math department needs to appoint a new chairperson, which will be
based on seniority. Ms. West has less seniority than Mr. Temple, but more than
Ms. Brody. Mr. Rhodes has more seniority than Ms. West, but less than Mr. Temple.
Mr. Temple doesn't want the job. Who will be the new math department chairperson?
136. Direction: You are given three true statements: Fact 1, Fact 2, and Fact 3. Then, you
are given three more statements (labeled I, II, and III), and you must determine
which of these, if any, is also a fact. One or two of the statements could be true; all
of the statements could be true; or none of the statements could be true. Choose your
answer based solely on the information given in the first three facts.
(A) I only
(B) II only
(C) II and III only
(D) None of the statements is a known fact
137. Direction: You are given three true statements: Fact 1, Fact 2, and Fact 3. Then, you
are given three more statements (labeled I, II, and III), and you must determine
which of these, if any, is also a fact. One or two of the statements could be true; all
of the statements could be true; or none of the statements could be true. Choose your
answer based solely on the information given in the first three facts.
If the first three statements are facts, which of the following statements must also be a
fact?
(A) I only
(B) II only
(C) II and III only
(D) None of the statements is a known fact
138. Direction: You are given three true statements: Fact 1, Fact 2, and Fact 3. Then, you
are given three more statements (labeled I, II, and III), and you must determine
which of these, if any, is also a fact. One or two of the statements could be true; all
of the statements could be true; or none of the statements could be true. Choose your
answer based solely on the information given in the first three facts.
If the first three statements are facts, which of the following statements must also be a
fact?
(A) I only
(B) II only
(C) III only
(D) None of the statements is a known fact
139. Direction: You are given three true statements: Fact 1, Fact 2, and Fact 3. Then, you
are given three more statements (labeled I, II, and III), and you must determine
which of these, if any, is also a fact. One or two of the statements could be true; all
of the statements could be true; or none of the statements could be true. Choose your
answer based solely on the information given in the first three facts.
If the first three statements are facts, which of the following statements must also be a
fact?
(A) I only
(B) II only
(C) II and III only
(D) None of the statements is a known fact
140. In a week the prices of a bag of rice were `350, `280, `340, `290, `320, `310, `300.
The range is
(A) 60
(B) 70
(C) 80
(D) 100
141. If x2 , 4 x + 3, 25 are in geometric sequence, find the values of x
1
(A) −
3
1
(B) or − 3
3
(C) −3
−1
(D) or 3
3
(A) 12
(B) 24
(C) 48
(D) 96
143. Look at this series : 1000, 200, 40, … What number should come next?
(A) 10
(B) 8
(C) 9
(D) 12
144. If for the triangle whose perimeter is 37 cms and length of sides are in G.P. also the
length of the smallest side is 9 cms then length of remaining two sides are ……….
and ……………..
(A) 12,16
(B) 14,14
(C) 10,18
(D) 15,13
145. If three positive real numbers a, b, c are in A.P. and if abc = 64 then the minimum
value of b is…………….
(A) 6
(B) 5
(C) 4
(D) 3
146. Function is said to be …………… if and only if f(a) = f(b) implies that a = b for all a
and b in the domain of f
(A) One-to-many
(B) One-to-one
(C) Many-to-many
(D) Many-to-one
147. In a group of 6 boys and 4 girls, four children are to be selected. In how many
different ways can they be selected such that at least one boy should be there?
(A) 159
(B) 194
(C) 205
(D) 209
148. At what rate of compound interest per annum will a sum of `1200 become ` 1348.32
in 2 years?
(A) 4%
(B) 5%
(C) 6%
(D) 7%
(A) {1}
(B) {5}
(C) {3}
(D) {2}
x 1
150. If A = and A2 is an identity matrix, then x is equal to
1 0
(A) 1
(B) 0
(C) −1
(D) 2
ANSWER KEY
Subject Name: 502 MSC COMPUTER SCIENCE
SI No. Key SI No. Key SI No. Key SI No. Key SI No. Key
1 B 31 C 61 B 91 B 121 A
2 B 32 C 62 A 92 A 122 D
3 A 33 B 63 A 93 B 123 D
4 C 34 B 64 D 94 B 124 C
5 A 35 C 65 C 95 B 125 D
6 B 36 B 66 D 96 B 126 A
7 B 37 D 67 D 97 B 127 D
8 D 38 D 68 C 98 B 128 D
9 A 39 A 69 C 99 B 129 B
10 C 40 A 70 C 100 A 130 B
11 D 41 C 71 C 101 C 131 C
12 A 42 C 72 D 102 C 132 C
13 A 43 B 73 B 103 B 133 C
14 B 44 B 74 C 104 B 134 B
15 C 45 C 75 B 105 B 135 A
16 A 46 C 76 D 106 C 136 B
17 A 47 B 77 C 107 B 137 B
18 B 48 C 78 B 108 A 138 C
19 B 49 C 79 A 109 D 139 D
20 C 50 B 80 C 110 D 140 B
21 A 51 B 81 D 111 A 141 D
22 B 52 A 82 A 112 C 142 D
23 C 53 A 83 D 113 A 143 B
24 B 54 D 84 C 114 B 144 A
25 C 55 C 85 D 115 D 145 C
26 A 56 D 86 A 116 D 146 B
27 D 57 A 87 D 117 D 147 D
28 B 58 D 88 B 118 B 148 C
29 B 59 C 89 A 119 D 149 C
30 B 60 C 90 C 120 C 150 B