123732876-UGC-NET
123732876-UGC-NET
Hey everyone, back after a two day break. Since we are done with December 2010 paper, I want
to choose the next one and it would be June 2012 now. From June 2012, Paper-II and Paper-III
are objective so we will do with paper-II first and then get on to paper-III. Like all other
solutions, it is all about understanding the answer and arriving at it conclusively, so that we can
learn something out of it which can be used in another situation.
It is never about simply remembering the answer for every question. It is all about understanding
it. That is why i am spending some time going through the explanation for answering every
question. Infact i wanted to do only one question a day, but that way we would take a lot of time
in finishing the solutions for the question papers and so i try to answer more than one question.
Okay, without wasting much of time, let us start.
Ans:-A
Explanation:-This is a simple question. The postfix expression can be evaluated using a stack.
First the operands are pushed into the stack and the moment a operator is encountered, operands
are popped out, operation performed on the operands and the result once again pushed into the
stack. This series of activities continue till the entire expression is not evaluated. So the answer is
A.
2. The post order traversal of a binary tree is DEBFCA. Find out the pre- order traversal.
(A) ABFCDE
(B) ADBFEC
(C) ABDECF
(D) None of the above
Ans:-C
Explanation:-
A binary tree is a data structure which has at most two child nodes. A binary tree can be
traversed in three ways. Inorder, preorder and postorder. The three methods of traversal can be
explained this way.
1
Postorder L - Left R - Right Ro - Root
Left will always be followed by right. But Root would be either in the front or in the middle or at
the last depending on whether it is pre, in or postorder traversal. So given a post order traversal
of a binary tree, we can know the root first. In the question, the post order traversal is given as
DEBFCA. Since Root is the last node to be traversed in a post order traversal we know one thing
for sure. A is the root.
Next, we are left with only DEBFC. Here some of the nodes belong to the left side of the binary
tree and some belong to the right side. How many nodes belong to the left and how many belong
to the right. Since left side of the binary tree is considered first, and since every node is expected
to have at most two child, DEB will be the left side of the binary tree and FC would be the right.
Now, we know that FC is in the right side of the binary tree. Again the last node would be the
root of the sub tree and F its left side.
Next we come to the left side of the binary tree and it is DEB. Again B would be the root of the
sub tree. D and E are its left and right side respectively. So the binary tree would look something
like this given below.
After constructing the binary tree, writing the preorder traversal is very simple. In preorder
traversal root comes first. Since A is the root, A would appear first. Following Root would be the
Left and Right sub tree and so the left subtree would be BDE. Again B would be the root of the
2
left sub tree followed by D and E which are the left and right child respectively. SO the preorder
traversal till now would be ABDE. Last comes the Right sub tree. Here again C would be the
root of the right sub tree followed by C its left child. So the entire preorder traversal of the tree
would be ABDECF. So option C is the right answer.
3.The branch logic that provides making capabilities in the control unit is known as
Ans:-A
Explanation:- This question is available in lot of websites and other materials and the answer
given there is unconditional transfer which is option C. But UGC answer key is given as option
A. I am just going to go with A, but will find out more about this and post it. Meanwhile, if there
are any explanation for this question,please post it, so that everyone can benefit.
36. X – = Y + 1 means
(A) X=X– Y +1
(B) X = –X – Y – 1
(C) X=–X+Y+1
(D) X=X– Y – 1
Ans:-D
Ans:-A
3
(B) Context-free languages are closed under concatenation.
(C) Context-free languages are closed under intersection.
(D) Context-free languages are closed under Kleene closure.
Ans:-C
Explanation:- CFL's are closed under union, concatenation, and Kleene closure. But not under
intersection or difference. So the correct answer is option C.
39. All of the following are examples of real security and privacy risks except
(A) Hackers
(B) Spam
(C) Viruses
(D) Identify theft
Ans:-B
Ans:-A
Ans:-B
(A) 16
(B) 32
(C) 64
(D) 128
4
Ans:-D
(A)p→q
(B) q→p
(C) p↔q
(D) p∨q
Ans:-B
Ans:-D
45. Which of the following is false concerning Enterprise Resource Planning (ERP) ?
Ans:-C
Ans:-D
5
(B) Crime fighting on the internet
(C) Online transaction processing
(D) Click stream analysis.
Ans:-B
Ans:-B
49. What is the probability of choosing correctly an unknown integer between 0 and 9 with 3
chances ?
(A) 963/1000
(B) 973/1000
(C) 983/1000
(D) 953/1000
Ans:-A
The number of nodes in a complete binary tree of height h (with roots at level 0) is equal to (A)
20 + 21 + ..... 2h
(B) 20 + 21 + ..... 2h – 1
(C) 20 + 21 + ..... 2h + 1
(D) 21 + ..... 2h + 1
Ans:-A
6
K:= K+1
The value of K after the execution of
this code shall be
(A) C(n + m – 1, m)
(B) C(n – m + 1, m)
(C) C(n + m – 1, n)
(D) C(n – m + 1, n)
Ans:-A
In order to understand the solution to this problem let us consider some sample value of n and m.
Let us say n=3 and m=2. The value of m also decides the number of inner loops we have. When
we say m=2, the total number of loops we have is 2 only. n decides the range of the outer most
loop. So the pseudocode can be understood as,
K:=0
for i:= 1 to n
for m:= 1 to i
K:=K+1
For the value of n=3 and m=2, the value of K would be incremented in the following manner.
i mK
11 1
21 2
22 3
31 4
32 5
33 6
The value of i ranges from 1 to n where n=3.
The value of K is K:=6 at the end of the iterations.
Substituting the value of n and m in the options given as the answer let us take option A.
C(n+m-1,m)=C(3+2-1,2)=C(4,2)=4!/2!*2!=6.
So the answer for this question is option A.
Ans:-B
7
Explanation:- The topic comes in Artificial Neural Networks(ANN). In this rule weights are
adjusted with respect to difference between desired output and actual output.
3. The concept of pipelining is most effective in improving performance if the tasks being
performed in different stages :
Ans:-B
Explanation:-
In the same June 2012 -Paper II, Question No 48 is based on pipelining and i have explained the
same there. Please refer to it.
4. What is Granularity ?
Ans:-B
Explanation:- Granularity refers to the size of any data item. It could be a tuple, relation,
database,anything. So the option is B.
5. Suppose that a given application is run on a 64-processor machine and that 70 percent of the
application can be parallelized. Then the expected performance improvement using Amdahl’ s
law is
(A) 4.22
(B) 3.22
(C) 3.32
(D) 3.52
Ans:-B
8
Explanation:-
According to Amdahl's law, in case of parallelization,if P is the proportion of the program that
can be made parallel, then (1-P) is the proportion that cannot be parallelized. Then the maximum
speedup that can be achieved by using N processor is, S(N)=1/(1-P)+P/N where N refers to the
no of processors, and P refers to the proportion that can be parallelized.
In the question above, no of processor, N=64
The proportion of the program that can be made parallel, P = 70%=0.7
So, substituting in the formula, we get, 1/(1-0.7)+0.7/64=1/0.3+0.0109375=1.0.310975
=3.215
=3.22
Therefore, the option is B.
6. If two fuzzy sets A and B are given with membership functions μA(x) = {0.2, 0.4, 0.8, 0.5,
0.1} μB(x) = {0.1, 0.3, 0.6, 0.3, 0.2} Then the value of μ ––– willbe A∩B
Ans:-A
Explanation:-
The fuzzy intersection of two fuzzy sets A and B on universe of discourse X: μA∩B(x) = min
[μA(x), μB(x)] , where x∈X
But here in the question, they are asking for complement of AintersectionB and so the answer
would be 1-min[A(x),B(x)]. The minimum of 0.2 and 0.1 will be 0.1, and 1-0.1 will be 0.9. The
second value is min(0.4,0.3)=0.3 and 1-0.3=0.7
The third value is min(0.8,0.6)=0.6 and 1-0.6=0.4
The fourth value is min(0.5,0.3)=0.3 and 1-0.3=0.7
The last value is min(0.1,0.2)=0.1 and 1-0.1=0.9
The only option which has got the values 0.9,0.7,0.4,0.7 and 0.9, although the fourth value is
given as 0.8 instead of 0.7 is option A. So the answer is option A.
9
(C) branches off to the interrupt service routine immediately.
(D) hands over control of address bus and data bus to the interrupting device.
Ans:-B
29. The maximum amount of information that is available in one portion of the disk access arm for a
removal disk pack (without further movement of the arm with multiple heads)
Ans:-B
30. Consider a logical address space of 8 pages of 1024 words mapped with memory of 32 frames. How
many bits are there in the physical address ?
(A) 9 bits
(B) 11 bits
(C) 13 bits
(D) 15 bits
Ans:-D
Explanation:-
The question asks about the number of bits in the physical address. The word size is 1024. So,
the number of bits required to calculate the offset into each page = 210=1024=10 bits.
So for 32 frames(25) of 1024 words each,we would require a total of 5+10 bits = 15 bits.
Therefore the option is D.
10
Ans:-D
(A) SSI
(B) MSI
(C) LSI
(D) VLSI
Ans:-B
Explanation:- The number of gates for the different classification are as follows.
Small Scale Integration(SSI) - <10
Medium Scale Integration(MSI) - between 10 to 1000
Large Scale Integration(LSI) - >1000
Very Large Scale Integration(VLSI) - >100000
So the answer is option B.
33.If an integer needs two bytes of storage, then the maximum value of unsigned integer is
(A) 216 –1
(B) 215 –1
(C) 216
(D) 215
Ans:-A
Explanation:- The same question is asked in June 2012,paper -II but there they have asked for
the maximum value of signed integer.The link to that answer is JUNE 2012 - PAPER II. Here it
is the maximum value of unsigned integer and the answer is option A.
Ans:-D
11
Explanation:-
Negative numbers can be represented in signed magnitude form, or '1' complement form or '2''s
complement form. So the option is D.
35. The cellular frequency reuse factor for the cluster size N is
(A) N
(B) N2
(C) 1/N
(D) 1/N2
Ans:-C
22. Which command classes text file, which has been created using “SET ALTERNA TIVE” “Command” ?
Ans:-A
Explanation:-
Actually the question should be which command is used for closing the text file, which has been
created using SET ALTERNATE TO . The answer is SET ALTERNATE OFF. SET
ALTERNATE ON directs the output to text file. OFF disables the output to text file.
12
(A) privacy invasion
(B) hardware failure
(C) fraudulent manipulation of data
(D) encryption and decryption
Ans:-C
Explanation:-
Option B and D are completely ruled out. Since the question talks about data security threat
choosing option C is correct than option A.
24. Which of the following statements is true, when structure of database file with 20 records is
modified ?
A) ? EOF ( ) Prints. T
(B) ?BOF()Prints F
(C) ?BOF()Prints T
(D) ?EOF()Prints F
Ans:-A
25. The SQL Expression Select distinct T. branch name from branch T, branch S where T. assets > S.
assets and S. branch-city = DELHI, finds the name of
(A) all branches that have greater asset than any branch located in DELHI.
(B) all branches that have greater assets than allocated in DELHI.
(C) the branch that has the greatest asset in DELHI.
(D) any branch that has greater asset than any branch located in DELHI.
Ans:-A
13
Ans:-A
27. The multiuser operating system, 20 requests are made to use a particular resource per hour, on an
average the probability that no request are made in 45 minutes is
(A) e-15
(B) e-5
(C) 1-e-5
(D) 1-e-10
Ans:-A
11. A station in a network forward incoming packets by placing them on its shortest output queue. What
routing algorithm is being used ?
Ans:-A
12. Start and stop bits are used in serial communications for
14
Ans:-C
13. For a data entry project for office staff who have never used computers before (user interface and
user- friendliness are extremely important), one will use
Ans:-C
14. An SRS
(A) establishes the basis for agreement between client and the supplier.
(B) provides a reference for validation of the final product.
(C) is a prerequisite to high quality software.
(D) all of the above.
Ans:-D
15. McCabe’ s cyclomatic metric V(G) of a graph G with n vertices, e edges and p connected component
is
(A) e
(B) n
(C) e– n +p
(D) e – n + 2p
Ans:-C
Explanation:-
The cyclomatic number V(G) of a graph with n vertices, e edges and p connected component is
V(G) = e - n + p
15
16. Emergency fixes known as patches are result of
Ans:-C
Ans:-A
18. Following is used to demonstrate that the new release of software still performs the old one did by
rerunning the old tests :
Ans:-D
19. The post order traversal of a binary tree is DEBFCA. Find out the pre- order traversal.
(A) ABFCDE
(B) ADBFEC
(C) ABDECF
(D) ABDCEF
Ans:-C
16
Explanation:- The same question is given in Paper II of June 2012 and i have explained the
same in this blog. Please refer to paper ii - question no 2 of June 2012 paper.The link is given
below
JUNE 2012 - PAPER II
Ans:-B
Explanation:- Again the same question is repeated in June 2012 paper and the answer is B.
Explanation for the same is provided there. In Question no 11 of paper ii - june 2012.The link is
June 2012 - PAPER II
21. What deletes the entire file except the file structure ?
(A) ERASE
(B) DELETE
(C) ZAP
(D) PACK
Ans:-C
Explanation:- Again this question is given in June 2012 paper-ii. Since i have solved june 2012-
paper II before the answer for the same is available there also. Question No 9 of June 2012-Paper
II.
17
6. A hash table has space for 75 records, then the probability of collision before the table is 6% full
(A) .25
(B) .20
(C ).35
(D).30
Explanation:
The answer which i am getting out of calculation is not available in any of the options given
here. Anyhow i will go ahead and give the explanation for the same. The hash table has space for
75 records. So let us say n=75. We have to calculate the probability of collision before the table
is 6% full. If the table is 6% full, then 5 slots are occupied in the table. Since it is given before
the table is 6% full, let us take the occupying items as 4. Let us calculate the probability of n
collision and then subtract them from 1 to get the final answer.
Prob. of no collision on first insertion = 1
Prob. of no collision on 2nd insertion=(n-1)/n=74/75
Prob. of no collision on 3rd insertion=(n-2)/n=73/75
Prob. of no collision on 4th insertion=(n-3)/n=72/75
So the probability of no collision on any of m insertions is the product of these values which is
=1 * 0.987 * 0.973 * 0.96* 0.947
= 0.873
So the likelihood of at least one collision is just 1 minus this value.
=1-0.873 = 0.123 which seems to be the answer. But there is no option like this at all. So i am
not answering this question.
18
Ans:-A
Explanation:-
In network topology, a star network is one where each host is connected to a central hub via a
point-to—point link. It is considered a s the easiest topology to design and implement. It is also
very easy to add nodes. But the disadvantage is that the hub represents a single point of failure. If
the hub is down then the entire network becomes down.
(A) Bandwidth
(B) Entropy
(C ) Loss
(D) Quantum
Ans:- B
10. Which of the following network access standard disassembler is used for connection station to a
packet switched network ?
(A) X.3
(B) X.21
(C) X.25
(D) X.75
Ans:- C
Explanation:-
X.25 is used in packed switched network. The idea is to connect a dumb terminal to a packet-switched
network.
(A) x≥3/2,y≥0
19
(B) x>3/2,y<=0
(C) x≥3/2,y≤0
(D) x≤3/2,y≤0
Ans:-D
Explanation:- Since i am not such a mathematical person, i am just giving you the link from
where you can get the explanation for this answer. The same problem along with how to arrive at
the answer is given in purple math. The link is,
http://www.purplemath.com/modules/fcns2.htm
(A) n2
(B) n(n-1)
(C) n(n + 1)
(D) n(n-1)/2
Ans:-D
Explanation:-
Theorem.
In an undirected simple graph with N vertices without loops, there are at most N(N-1)/2 edges.
This can be proved by induction.
This can also be verified by drawing some simple graphs of 2,3, 4 and 5 vertices. But No
multiple edges. So the answer is option D.
(A) Strings
(B) Lists
(C) Stacks
(D) None of the above
20
Ans:-D
Explanation:- In Linear type data can be traversed sequentially. For example, arrays, linked list.
In non linear type data is traversed in a non-sequential,hierarchal manner. Example are trees,
Binary search trees etc. So option D will be the correct answer.
(A) 0(log n)
(B) 0(n log n)
(C) 0(n)
(D) None of the above
Ans:-D
Explanation:-
The total number of comparisons in a bubble sort is
=(N-1)+(N-2)+…+2+1
=(N-1)*N/2=O(N2)
Since this value is not available in the list of options,we go with D.
(A) Factorial
(B) Fibonacci numbers
(C) Tower of Hanai
(D) Tree traversal
Ans:-B
21
37. Interrupts which are initiated by an instruction are
(A) Internal
(B) External
(C) Hardware
(D) Software
Ans:-D
1. External interrupts
2. Internal interrupts
3. Software interrupt
External interrupts come from I/O devices. Internal interrupts are from illegal or wrong use of an
instruction or data. A software interrupt is initiated by executing an instruction. The answer key gives
the answer as C. But i think it should be D.
Ans:-B
Explanation:- The %c format specifier prints the ascii equivalent of the value.
39. For the transmission of the signal, Bluetooth wireless technology uses
Ans:-C
22
40. Consider the following statements :
I. Recursive languages are closed under complementation.
II. Recursively enumerable languages are closed under union.
III. Recursively enumerable languages are closed under complementation.
Which of the above statements are true ?
(A) I only
(B) I and II
(C) I and III
(D) II and III
Ans:-B
Explanation:-
Recursive languages are closed under the following operations.
1. Kleene star
2. Concatenation
3. Union
4. Intersection
5. Complement
6. Set difference
1. Kleene star
2. Concatenation
3. Union
4. Intersection
Recursively enumerable languages are not closed under complement. So the statements I and II are only
true. So the option is B.
(A) OSPF
(B) Link-state
(C) Dynamic
(D) Dijkestra vector
Ans:-
23
Explanation:- Actually in the answer key it is given as D which is Dijkestra vector. RIP(Routing
Information Protocol) and IGRP(Interior Gateway Routing Protocol) are examples of Distance
Vector routing protocols and Open Shortest Path First(OSPF) is an example of Link State routing
protocols. Distance Vector routing protocols are based on Bellma and Ford algorithms. Link
state routing protocols are based on Dijkstra algorithms. Here the options OSPF, Link-state are
ruled out. Even Dijkestra is ruled out because link state protocols are based on that. The only left
out option is C which is Dynamic and which does not comply with the answer key. So i am just
not entering any particular option for it.
(A) The overall strategy drives the E-Commerce data warehousing strategy.
(B) Data warehousing in an E-Commerce environment should be done in a classical manner.
(C) E-Commerce opens up an entirely new world of web server.
(D) E-Commerce security threats can be grouped into three major categories.
Ans:-D
Explanation:- E-commerce security threats are more than 3 in number and so the incorrect
statement here is D.
Ans:-B
Explanation:- One of the closest answer to this also could be option A which is quality of the
design. But it can also be understood that if a software product has a large number of defects it is
unreliable. So if the reliability of the software improves it means that the number of defects has
reduced. So reliability of software is dependent on the number of errors present. So it is option B.
24
(C) Conducting an auction
(D) Evaluating an employee
Ans:-D
Explanation:- This is a simple one and in fact does not need any explanation.
45. ______ is a satellite based tracking system that enables the determination of person’s position.
(A) Bluetooth
(B) WAP
(C) Short Message Service
(D) Global Positioning System
Ans:-D
Explanation:- Again quite a easy one and does not need much explanation.
(A) Microprocessor
(B) Memory
(C) Peripheral equipment
(D) All of the above
Ans:-D
Ans:-C
25
Explanation:- Since option A,B and D are ruled out, the answer is option C.
Ans:-B
(A) Strings
(B) Lists
(C) Queues
(D) All of the above
Ans:-D
No explanation needed
50. To represent hierarchical relationship between elements, which data structure is suitable ?
(A) Dequeue
(B) Priority
(C) Tree
(D) All of the above
Ans:-C
26
Explanation:- Dequeue and priority are types of queues which is again a linear data structure. If
you want to represent hierarchal elements we should go for tree and so answer is option C.
34. Check sum used along with each packet computes the sum of the data, where data is treated as a
sequence of
(A) Integer
(B) Character
(C) Real numbers
(D) Bits
Ans:-B
Explanation:- Check sum is the error detecting mechanism when data is treated as a sequence of
character. Parity is the mechanism used when data is treated as a sequence of bits.
35. If an integer needs two bytes of storage, then the maximum value of a signed integer is (A) 216 – 1
(B) 215 – 1
(C) 216
(D) 215
Ans:-B
36.Which of the following logic families is well suited for high-speed operations ?
(A) TTL
(B) ECL
(C) MOS
(D) CMOS
Ans:-B
Explanation:- ECL stands for Emitter-Coupled Logic. It is designed for extremely high speed
application. It is well suited for large mainframe computer that require high number of operation
per second.
27
Email ThisBlogThis!Share to TwitterShare to Facebook
30. In round robin CPU scheduling as time quantum is increased the average turn around time
(A) increases
(B) decreases
(C) remains constant
(D) varies irregularly
Ans:-D
Explanation:-
There are few criterias used for measuring the performance of a particular scheduling algorithm.
The turn around time is the interval of time between the submission of a process and its
completion.
The wait time is the amount of time a process has been waiting in the ready queue.
The response time is the time taken between the process submission and the first response
produced.
In RR algorithm, the value of time quantum or the time slice, plays a crucial role in deciding how
effective the algorithm is. If the time quantum is too small, there could be lot of context
switching happening which could slow down the performance. If the time quantum is too high,
then RR behaves like FCFS. If the time quantum is increased, the average response time varies
irregularly. If you take any comprehensive material on operating system, you will come across a
graph which depicts this behavior. So the answer is option D.
Ans:-A
Explanation:- There are four necessary and sufficient conditions for a deadlock. One of them is
Mutual Exclusion which means that the resources involved are non-sharable. So the answer is
option A.
28
32. Cached and interleaved memories are ways of speeding up memory access between CPU’s and
slower RAM. Which memory models are best suited (i.e. improves the performance most) for which
programs ?
Ans:-B
Explanation:- Compared to the processor speed, the speed of the primary memory is slow.
Cache memory is a small memory which sits in between the processor and primary memory and
fetches information to the processor at a much higher speed or it makes it appear so. Caching can
be effective based on a property of computer programs called locality of reference. Analysis of
program show that the majority of the execution time is spent around a small part of the program
may be a simple loop,nested loop or a few functions. The rest of the program is accessed
infrequently. There is something called temporal locality and spatial locality also which we need
to know when we talk about cache. But cache memory is ideally suited for small loops.
Interleaved memory is a technique for increasing the speed of RAM. Here multiple memory
chips are grouped together to form what are known as banks.Each of them take turns for
supplying data. An interleaved memory with "n" banks is said to be n-way interleaved.
Macintosh systems are considered to be one using memory interleaving.
So the answer for this question is option B.
33. Consider the following page trace : 4,3, 2, 1, 4, 3, 5, 4, 3, 2, 1, 5 Percentage of page fault that would
occur if FIFO page replacement algorithm is used with number of frames for the JOB m = 4 will be
(A) 8
(B) 9
(C) 10
(D) 12
Ans:-C
Explanation:-
The reference string is 4,3,2,1,4,3,5,4,3,2,1,5
The number of frames m = 4
29
The first 4 references(4,3,2,1) cause page faults and brought into the empty frames.
The next reference (4) is already available and so there is no page fault.
The next reference (3) is also already available and so there is no page fault.
The next reference (5) replaces page 4 which was brought in first.No of page faults=5.
Next reference (4) replaces page 3 which is the next to come in.No of page faults=6.
Next reference (3) replaces 2.No of page faults till now=7.
Next reference (2) replaces 1 which was the last of the pages to come in. No of page faults till
now=8.
Next reference (1) replaces 5 which was the first to come in in the second cycle. No of page
faults till now=9.
The last reference in the reference string is 5 which will replace 4. No of page faults till now=10
So the answer is option C which is 10.
Ans:-B
Explanation:-
A function oriented design focusses on creating modules or functions and each module supports
its own abstraction. The design purpose is to minimize coupling and maximize cohesion.
Cohesion is a way of understanding how close or bound your module is. Coupling is the level of
interactivity between modules. For a good design to happen cohesion should be more and
coupling should be less.
25. Which of the following metric does not depend on the programming language used ?
30
(C) Member of token
(D) All of the above
Ans:-B
Explanation:-
Line of count and Member of token depend on the programming language. Function count does
not depend on programming language. Function count are a unit of measure for software just like
a unit of measure for temperature would be degrees.
26. A/B+ tree index is to be built on the name attribute of the relation STUDENT. Assume that all
students names are of length 8 bytes, disk block are of size 512 bytes and index pointers are of size 4
bytes. Given this scenario what would be the best choice of the degree (i.e. the number of pointers per
node) of the B+ tree ?
(A) 16
(B) 42
(C) 43
(D) 44
Ans:-C
Actually the answer given in the UGC answer key is option A. But i would beg to differ with
that. Using the formula for calculating the degree with the parameters specified above, the
answer we are arriving at is 43 which is actually option C. Let me explain how it is done.
31
27. The Inorder traversal of the tree will yield a sorted listing of elements of tree in
Ans:-B
Explanation:-
In a binary search tree all the elements to the root of the tree will lesser than that of the root. Also
elements greater than the root will be to the right of the root. So, in order traversal of such a tree
would yield a sorted listing of elements.
Ans:-B
Explanation:-
Mobile IP is the basic behind how wireless devices offer IP connectivity. Agent discovery and
registration are two basic functions involved here. So the options is B.
Ans:-A
Explanation:-
Again one of those rare non ambiguous question. Every process is allocated a specific time slice
in the CPU and it runs for that entire time. In pre-emptive scheduling even before the process's
time slice expires, it is temporarily suspended from its execution. So the option is A.
32

Ans:-B
Explanation:- Traditional Ethernet technologies had four standards for 10Mbps. They are,
Fast Ethernet is referred by 100BaseX standard. 100BaseX has three specifications. Here 100 refers to
the speed 100Mbps. Base refers to Baseband.The specifications are
1. 100BaseT4
2. 100BaseTX
3. 100BaseFX
100BaseFx uses the 2-strand fiber-optic cable and the station to hub distance is 2000 metros.
(A) program
(B) software
(C) within budget
(D) software within budget in the given schedule
33
Ans:-D
21. Key process areas of CMM level 4 are also classified by a process which is
Ans:-C
Explanation:- In CMM model there are five maturity levels identified by the numbers 1 to 5.
They are
1. Initial
2. Managed
3. Defined
4. Quantitatively Managed
5. Optimizing
If an organization is at level 2, it means it has crossed over level 1 and the same holds true for
subsequent levels. At level 4, the process at level 3 is also included. CMM level 5 is not correct because
the question only talks about level 4. CMM level 2 is not correct because level 3 includes level 2 as well.
So option C is the correct answer.
Ans:-B
Explanation:-
Validation - Are we building the right product
Verification - Are we building the product right.
34
23. If a process is under statistical control, then it is
(A) Maintainable
(B) Measurable
(C) Predictable
(D) Verifiable
Ans:-C
Explanation:-
The answer is available in the book "Integrated approach to software engineering" by Pankaj
Jalote. A predictable process is also said to be under statistical control.
14. Which of the following TCP/IP Internet protocol is diskless machine uses to obtain its IP address from
a server ?
(A) RAP
(B) RIP
(C) ARP
(D) X.25
Ans:-C
Explanation:- ARP is a protocol in the TCP/IP protocol suite. This protocol is required for basic
TCP/IP operations. This protocol is used to find the ethernet(hardware) address from a specific
IP number.
15. Decryption and encryption of data are the responsibility of which of the following layer ?
35
Ans:-C
Explanation:- Not a very complicated question. Decryption and encryption of data happens in
the presentation layer. One more important activity which happens at this layer is the
Compression and decompression of data.
16. In which circuit switching, delivery of data is delayed because data must be stored and retrieved
from RAM ?
Ans:-B
17. In which Routing Method do all the routers have a common database ?
Ans:-B
Explanation:- There are two major classes of routing methods.One is Distance vector and the
other one Link state. In distance vector, each router knows only its neighbors. Decision is taken
on two factors one is distance and the other vector, that is the direction to reach. In case of link
state all the routers know about the paths reachable by all other routers in the network. All
routers possess a synchronized copy of the area's link-state database. So the answer for this
question would be option B.
18. Page Shift Keying (PSK) Method is used to modulate digital signal at 9600 bps using 16 level. Find the
line signals and speed (i.e. modulation rate).
36
Ans:-A
Explanation:- Inorder to know why option A is the answer, let us understand the following
table.
4-PSK N 2N
8-PSK N 3N
16-PSK N 4N
In the question it is mentioned as page shift keying, but it is actually Phase Shift Keying. Two values are
provided. One is bps which is nothing but Bits per second which is 9600 and also level which is 16.
According to the table given above, for a 16-PSK, given the baud rate N, the bit rate would be 4N. Here
bps is provides which is 9600. In order to calculate the baud rate we have to divide bps/4, because the
signal level is 16. So the answer would be 9600/4=2400 baud. That is how the answer is arrived at.
(A) COPY TO
(B) COPY STRUCTURE TO
(C) COPY FILE
(D) COPY TO MFILE-DA T DELIMITED
Ans:-B
Explanation:- I am considering the same answer as what is given in the UGC answer key. I will
find out why that command is supposedly faster than the rest. Give me some time. Meanwhile, i
do not want to get stuck in this question and i want to proceed. So we are off to the next one but
will visit the same sometime later.
37
11. B+ tree are preferred to binary tree in Database because
Ans:-B
Explanation:- Actually the same question was given in GATE CS(2000) paper and the solution
is available in a webpage called geeksforgeeks. A good page with solutions to some gate
questions. Everyone knows that disk access is slower compared to memory access. When we
compare a binary tree to a B+ tree, B+ tree is supposed to have a higher fanout. What is a fanout
actually?. B+ trees can store a relatively large number of pointers to child nodes in each node.
Fanout means the number of pointers per node. B+ trees minimize the depth of the tree( and so
one can reach the leaf node faster)by employing high fanout. That is linking many children from
each node. Because of a high fanout the number of I/O operations required to find an element in
the tree would be less. So B+ trees are preferred. The option is B.
Ans:-D
Explanation:- Transaction manager performs all the operations mentioned in option A,B and C.
13. Leaves of which of the following trees are at the same level ?
Ans:-B
Explanation:- In a B-tree leaves are at the same level. A B-tree of order m is an m-way tree
which means that for each node there may be upto m children. m should be odd only.
38
Posted by Vani Chakraborty at 12:18 No comments:
4. The number of colours required to properly colour the vertices of every planer graph is
(A) 2
(B) 3
(C) 4
(D) 5
Ans:-D
Explanation:- According to the Five-colour theorem, Every planar graph is 5-colourable. Any
planar graph G with n vertices requires five colors for proper coloring. So the answer must be
option D which is 5. But in the UGC answer key it is given as 2, option A. But the correct
answer is D.
(A) Packets
(B) Switches
(C) Bridges
(D) Routers
Ans:-D
Explanation:- Packets are the units of exchanging information in network. A bridge connects
two or more networks, or segments of the same network. Switches are basically Bridges but
usually have multiple ports. Routers forward data packets from one place to another. They
forward data depending on the network, not the hardware(MAC)address. So the answer is option
D.
6.Both hosts and routers are TCP/IP protocol software. However, routers do not use protocol from all
layers. The layer for which protocol software is not needed by a router is
39
(C) Layer – 3 (Internet)
(D) Layer – 2 (Network Interface)
Ans:-A
Explanation:- Routing is a way to get one packet from one destination to the next. But the Layer
- 5 (Application) includes all the higher-level protocols. So the layer for which protocol software
is not needed by a router is Layer - 5, the Application Layer which is option A.
7. In multiuser database if two users wish to update the same record at the same time, they are
prevented from doing so by
(A) Jamming
(B) Password
(C) Documentation
(D) Record lock
Ans:-D
(A) All items in the left subtree are less than root
(B) All items in the right subtree are greater than or equal to the root
(C) Each subtree is itself a binary search tree
(D) All of the above
Ans:-D
Explanation:- The statements given in the option A and C are true, is very clear. There could be
only a slight confusion whether statement in option B is true or not. The above mentioned
properties are mentioned in the book on Data structures:A pseudocode approach with C written
by Richard F.Gilberg et al. According to the summary on binary search trees the following
properties are mentioned.
All items in the left subtree are less than the root.
All items in the right subtree are greater than or equal to the root.
Each subtree is itself a binary search tree.
40
So the correct answer for this question would be option D.
(A) ERASE
(B) DELETE
(C) ZAP
(D) PACK
Ans:-C
Hey everyone, back after a two day break. Since we are done with December 2010 paper, I want
to choose the next one and it would be June 2012 now. From June 2012, Paper-II and Paper-III
are objective so we will do with paper-II first and then get on to paper-III. Like all other
solutions, it is all about understanding the answer and arriving at it conclusively, so that we can
learn something out of it which can be used in another situation.
It is never about simply remembering the answer for every question. It is all about understanding
it. That is why i am spending some time going through the explanation for answering every
question. Infact i wanted to do only one question a day, but that way we would take a lot of time
in finishing the solutions for the question papers and so i try to answer more than one question.
Okay, without wasting much of time, let us start.
Ans:-A
Explanation:-This is a simple question. The postfix expression can be evaluated using a stack.
First the operands are pushed into the stack and the moment a operator is encountered, operands
are popped out, operation performed on the operands and the result once again pushed into the
stack. This series of activities continue till the entire expression is not evaluated. So the answer is
A.
2. The post order traversal of a binary tree is DEBFCA. Find out the pre- order traversal.
(A) ABFCDE
(B) ADBFEC
41
(C) ABDECF
(D) None of the above
Ans:-C
Explanation:-
A binary tree is a data structure which has at most two child nodes. A binary tree can be
traversed in three ways. Inorder, preorder and postorder. The three methods of traversal can be
explained this way.
Left will always be followed by right. But Root would be either in the front or in the middle or at the last
depending on whether it is pre, in or postorder traversal. So given a post order traversal of a binary tree,
we can know the root first. In the question, the post order traversal is given as DEBFCA. Since Root is the
last node to be traversed in a post order traversal we know one thing for sure. A is the root.
Next, we are left with only DEBFC. Here some of the nodes belong to the left side of the binary tree and
some belong to the right side. How many nodes belong to the left and how many belong to the right.
Since left side of the binary tree is considered first, and since every node is expected to have at most
two child, DEB will be the left side of the binary tree and FC would be the right.
Now, we know that FC is in the right side of the binary tree. Again the last node would be the root of the
sub tree and F its left side.
Next we come to the left side of the binary tree and it is DEB. Again B would be the root of the sub tree.
D and E are its left and right side respectively. So the binary tree would look something like this given
below.
42
After constructing the binary tree, writing the preorder traversal is very simple. In preorder traversal
root comes first. Since A is the root, A would appear first. Following Root would be the Left and Right
sub tree and so the left subtree would be BDE. Again B would be the root of the left sub tree followed by
D and E which are the left and right child respectively. SO the preorder traversal till now would be ABDE.
Last comes the Right sub tree. Here again C would be the root of the right sub tree followed by C its left
child. So the entire preorder traversal of the tree would be ABDECF. So option C is the right answer.
3.The branch logic that provides making capabilities in the control unit is known as
Ans:-A
Explanation:- This question is available in lot of websites and other materials and the answer
given there is unconditional transfer which is option C. But UGC answer key is given as option
43
A. I am just going to go with A, but will find out more about this and post it. Meanwhile, if there
are any explanation for this question,please post it, so that everyone can benefit.
36. The dynamic allocation of storage areas with VSAM files is accomplished by
(A) Hashing
(B) Control splits
(C) Overflow areas
(D) Relative recoding
Ans:-B
Explanation:-VSAM stands for Virtual Storage Access Method. It was introduced by IBM. It is
a method of managing files. It can speed up the access to data in the files. The dynamic
allocation of storage areas with VSAM files is accomplished by Control Splits.
37. Which of the following command the file names in multiple columns ?
(A) IS–X
(B) IS
(C) IS – 1
(D) IS–f–X
Ans:-B
Explanation:- Although the command appears to look like IS, it should be understood as ls.
There is no command called IS anywhere i could think of. ls with a -1 option will list only one
entry per line. So option C is ruled out. The purpose of -X option is to sort out the list
alphabetically by entry extension. The purpose of -f option is not to sort the list alphabetically.
This option also puts on the -a option. So all the files including hidden ones will be displayed. So
what is the option which would list columnar listing of names.It is actually -C. But the output of
ls -C and ls simply matches and so i have chosen option B as the right answer which is ls itself. If
anyone has any other answer or explanation please post it and we can discuss it.
44
38. WINDOWS is a _________ operating.
Explanation:- I would straightaway go for the explanation here. The question is a typical UGC
Net one intended to confuse the candidates. WINDOWS is specified, no specific version or
anything is given. If you consider windows 3.x, it was cooperative and non-preemptive. But
windows 95,NT and 2000 are preemptive. Windows 3.x was not multi-user. But windows
NT,2000 are multi-user. Again windows 3.x cannot be categorized as a real time operating
system also. Since the question itself has got some ambiguity you can choose whatever option
which you feel and keep your fingers crossed about it. I would not go with Real time. Anything
else i could go with. Please post any other way of understanding this question and the correct
answer for this. Till then, i refrain from answering this question.
(A) Interruption
(B) Termination
(C) Swapping
(D) None of the above
Ans:-C
Explanation:- Swapping is one of the memory management techniques used by the operating
system. Since the size of the RAM is limited and finite, all the processes or programs to be
executed cannot be made to fit in it. So the disk is also treated as an extension of the memory and
is referred to as virtual memory. The page making process from main memory to disk is called
swapping.
45
Ans:-B
Ans:-C
Explanation:- Prototyping is one of SDLC model. It starts with requirement gathering and
establishing a quick prototype which is an early approximation of a final product. This prototype
is then evaluated by the customer/user and used to refine the requirements for the software to be
developed. So, C is the option.
Ans:-D
Explanation:- Actually i have had my own doubts with the answer for this question. I have
referred to lots of materials and paper and resolved the correct answer for this. According to
Lientz and Swanson, software maintenance can be divided into three components. corrective,
adaptive and perfective maintenance. Corrective maintenance involves correcting errors or actual
faults in the software. So this is option A. Adaptive maintenance is the changes needed as a
consequence of some change in the environment in which the system must operate. And this is
option B. Finally perfective maintenance refers to changes that originate from user requests.
Infact adaptive and perfective categories can be joined together and called as enhancements
which is option C. So the only one which is not talked about is option D and so D is the right
answer.
46
43. The system specification is the first deliverable in the computer system engineering process which
does not include
Ans:-A
Explanation:- The system specification document describes the system and gives a high-level
view of what the system will provide. The system specification is the guide that will allow
details on hardware,software and test requirements. So i think functional description will not be a
part of system specification. So the correct answer is A.
44. The COCOMO model was introduced in the book title “Software Engineering Economics” authored
by
Ans:-B
Explanation:- This is a fairly simple question. COCOMO model was introduced in the book
authored by Barry Boehm. So the correct answer is B.
Ans:-A
47
46. A data mart may contain
Ans:-D
Explanation:- Datawarehouses are huge. If a department has its own data mart, it can customize
the data as the data flows into the data mart from the data warehouse. It can
summarize,sort,select and structure its own data.So the option would be D.
(A) the process of extracting valid, previously unknown, comprehensible and actionable information
from large databases and using it to make crucial business decisions.
(B) a tool that allows end users direct access and manipulation of data from within data- warehousing
environment without the intervention of customised programming activity.
(C )a tool that helps end users extract useful business information from large database.
(D)All of the above
Ans:-A
Explanation:- Since it is a definition of Data Mining which is spoken about, option A is correct.
Ans:-C
Explanation:- E-Choupal is an initiative by ITC. Through this initiative they want to empower
the farmers with expert knowledge. This would enhance his competitiveness in the global
market.
48
49. The basic concepts of ethics in information society is/are
(A) Responsibility
(B) Accountability
(C) Liability
(D) All of the above
Ans:-D
Explanation:- Nothing much. The basic concepts of ethics in information society is/are
Responsibilty,Accountability and Liability. I think most of you would have guessed it anyway.
50. One of the distinguished features of super-computer over other category of computer is
Ans:-A
Explanation:- Option B is ruled out. But all the other options also look similar but since they are
asking about distinguished feature i would go with option A. Any other ideas please post.
Whew…we are done with December 2010 QP. Wait and watch for the next paper and discussion of its
solutions.
49
31. Object code is the output of ______.
Ans:-B
Explanation:- Again this is one of those questions where more than one option looks correct. I
think option B is correct because both compiler and assembler converts the source language code
to the object code. If anyone has any other version,please post it and we can discuss it.
Ans:-A
Explanation:-Looking at all the other options, the only one which seems more appropriate is
option A.
Ans:-C
Explanation:- The following are the main phases of a compiler and the activities done in each
one of the phases.
1.Lexical Analysis:-In this phase the source program is split into what are called 'tokens'.
2.Syntax Analysis:-The tokens are grouped together into phrases which should match some
specified grammar.Normally, one of the outputs of a syntax analysis phase would be a Abstract
Syntax Tree.(AST)
3.Semantic Analysis:-This phase would traverse through the AST and refine it.
50
4.Intermediate code generation:-This phase generates a machine independent code.
5.Code optimization:-Use some strategies to optimize the code that is generated.
6.Code generation:-Generate the machine dependent code finally.
Symbol table generation and error handling would be part of almost all phases. So the grammar
checking would be done at syntax analysis phase. Hence the option is C.
34. The register or main memory location which contains the effective address of the operand is known
as
(A) pointer
(B) special location
(C) indexed register
(D) None of the above
Ans:-A
(A) Hardware
(B) Compiler
(C) Registers
(D) None of the above
Ans:-B
51
Ans:-B
Ans:-B
Explanation:-
The baud rate of a data communication system is the number of symbols per second transferred. It is
equal to twice the bandwidth of an ideal channel.
Ans:-D
29. Which of the following file transfer protocols use TCP and establishes two virtual circuits between
the local and remote server ?
(A) FTP
(B) TFTP
(C) TELNET
(D) NFS
52
Ans:-A
Explanation:- There could be a ambiguity between the options A and B for this one. C and D
are ruled out. So, what is the difference between FTP and TFTP. The purpose of both the
protocols is to obtain files from a remote host. But TFTP stands for trivial file transfer protocol.
It is not very reliable or secure. It uses the packet delivery service offered by UDP. On the other
hand, FTP stands for File Transfer Protocol. It is a mechanism provided by TCP/IP. It uses the
services offered by TCP. It is reliable and secure. It establishes two connections(virtual
circuits)between the hosts, one for data transfer and another for control information. So the
answer for this question is option A.
(A) exhibited by all demodulator, when the input signal to noise ratio is low.
(B) the rapid fall on output signal to noise ratio when the input signal to noise ratio fall below a
particular value.
(C) the property exhibited by all A.M. suppressed carrier coherent demodulator.
(D) the property exhibited by correlation receiver.
Ans:-B
Ans:-B
Explanation:- Linear probing is a term associated with hashing. Linear probing is a collision
resolving technique in hashing. It suffers from a problem known as primary clustering. Any
chosen hash function should uniformly distribute the records across the given available address
53
space but sometimes clusters appear. If linear probing is used, it might spend a lot of time
probing within the cluster instead of searching in the subsequent available space. One more
collision resolving technique is Quadratic probing. Again we might come across the same topic
depending on the nature of question encountered in future.
25. Which of the following can be the sequence of nodes examined in binary search tree while searching
for key 88 ?
Ans:-C
Explanation:- Inorder to find a solution for a question like above, given the data draw a binary
search tree for each one of the options. The first item is the root. Any value less than the root will
form the left side of the tree and any value greater than the root will form the right side of the
tree. When you draw such a tree, if you find no node has a left and right child then such a
sequence would be valid. If you find that the tree has a left and right child for any node then that
sequence is invalid. If you draw the tree for all the 4 options given in the question you will find
that only option C does not have left and right child for any node. So option C is correct.
21. What is the maximum number of nodes in a B-tree of order 10 of depth 3 (root at depth 0) ?
(A) 111
(B) 999
(C) 9999
(D) None of the above
Ans:-C
Explanation:-
The formula for calculating the maximum number of nodes in a B-tree of order order n of depth
h is
mh+1-1
54
Here, m=10 and h=3. So the formula becomes
104-1 which is 10000-1=9999 and therefore C is the correct option.
(A) 54
(B) 27
(C) 26
(D) None of the above
Ans:-D
Explanation:-
This is quite a straightforward one. A binary tree with n nodes has n+1 null branches. So a binary
tree with 27 nodes will have 28 null branches. Since 28 is not available as a option, D is the
correct answer.
There is some question based on binary trees or trees in most of the NET paper. The following
question is from June 2011 paper and this is also based on trees.
(A) 256
(B) 255
(C) 248
(D) None of these
Ans:-C
Explanation:-
The number of different trees with n nodes can be calculated as 2n-n. Here the value of n=8. So,
the formula would become
28-8=256-8=248
So the answer is 248 and so the option is C.
(A) 0(1)
(B) 0(lgn)
(C) 0(n)
(D) 0(nlgn)
55
Ans:-C
Explanation:-
The WORST CASE COMPLEXITY to build a heap of n elements is the option C.
Ans:-B
Explanation:-
Actually the same question is available in the book "Database systems:Concepts, Design and application"
by S.K.Singh. There are lot of questions at the end of every chapter in that book. According to the book,
since the head assembly is heavier, DVD and CD drives have much longer seek time as compared to
magnetic-disk drives. Rotational speeds of DVD and CD drives are lower than that of magnetic disk
drives. So the answer for the above question is B which is optical storage is a low speed direct access
storage device.
20. Which of the following is the process by which a user’s access to physical data in the application is
limited, based on his privileges ?
(A) Authorization
(B) Authentication
(C) Access Control
(D) All of these
Ans:-C
56
Explanation:-
In order to understand the answer for this we need to know the difference between authorization,
authentication and access control. It is well explained in oracle docs.
Authentication is the process by which a user's identity is checked.
Authorization is the process by which the user's privileges are ascertained.
Access control is the process by which the user's access to physical data in the application is
limited, based on his privileges.
Explanation:-
In order to know the answer for this let us first go through what concurrency control means. When
many people try to make modifications to a database at any point of time, there should be a system of
controls in place to ensure that changes made by one do not adversely affect the other. This is called
concurrency control. THere are basically two major categories of concurrency control and types under
them.
Types of concurrency control
1. Pessimistic methods
1. Timestamp ordering methods
2. Serialization graph testing
3. Locking methods
2. Optimistic methods
1. Backward validation methods
2. Forward validation methods
3. Hybrid methods
The main idea behind pessimistic method is that it is assumed that transaction could be problem prone.
In optimistic method it is assumed that transaction may not face any problem. Optimistic methods are
deadlock-free whereas pessimistic method is deadlock-prone. We can look at it in detail depending on
any question which we will come across in future. In june 2011 paper -II we had the following question.
The basic variants of time-stamp- based method of concurrency control are
(A) Total time stamp-ordering
(B) Partial time stamp ordering
57
(C) Multiversion Time stamp ordering
(D) All of the above
We will look at all such questions later.
Ans:-A
Explanation:- The question itself requires a bit of explanation. It is not enough if you just know
what is the right answer but you must also know why it is the right answer. The explanation
would be a bit lengthy. Let us first dissect the question and explain some terms in terms of
DBMS.
Relation Schema - This is known as Table definition. Relation Schema for a "student" relation
can be shown in the following way:
Student(FirstName,LastName,DOB,Gender,Course,Regno,Address)
58
Let us first consider the relation R1(A B C). Here between A and B the functional dependency
FD1 is preserved. Between B and C, FD2 is preserved.
Let us now consider the second relation R2(C D). Between C and D the FD, FD3 is preserved.
So in the two relations R1 and R2, all the 3 functional dependencies are preserved.
1. Lossless
2. Dependency preservation
3. Minimal redundancy
The above question was based on dependency preservation decomposition. This example has been
taken from the dependency preservation presentation by Jason Allen. The explanation is quite good
there.
SUMMARY:-
Ans:-C
59
15. "Black” refers in the “Black-box” testing means
Explanation:-
For obvious reasons, option A is ruled out. Now let us look at the meaning of black box testing.
The term "Black box" refers to the actual software that is getting tested. In black box testing one
knows only the set of inputs and expected outputs and is unaware of how those inputs are
transformed into outputs by the software. So option C seems to be the right choice.
There are many types of black box testing techniques. It is better to know some of them by name.
Depending on any more questions based on black box testing we can go through the techniques in detail
later. I think knowing some technique names could be useful for now.
Ans:-C
(A) maximized
(B) minimized
(C) both (A) & (B)
(D) None of these
Ans:-B
Explanation:-
Generalisation and specialization are two terms that have a opposite meaning. In generalization
the differences between members of an entity is minimized. Generalisation is a bottom up
process. It goes from more specific to more general. For example, if the subclasses are taken as
car and bike they would fall under the category of superclass called vehicle. From the subclasses
we would identify features which can take us to the superclass vehicle.
60
Specialisation is the opposite of this. In Specialisation the differences between members of an
entity are maximized. Specialisation is a top down process. It goes from more general to more
specific. If vehicle is a super class and car and bike are its subclasses, identifying the
characteristics or uniqueness of its subclasses is what happens in specialization.
It is a sort of repeatedly asked question. In June 2010 the following question appeared.
(A) top-down
(B) bottom up
(C) both (A) & (B)
(D) None of these
Ans:-B
Explanation:- Since this question is a very simple and easy one i am posting the answer for this
also today. Otherwise my idea was to take one question, explore it, analyze and then try to
present the answer. Although many of the readers must be knowing this answer i still want to
emphasize that the body of a do…while loop is executed at least once, since the condition is
tested at the bottom. In case of while loop and for loop, the condition is tested at the top of the
loop, so there are chances that they may not be executed at all. But that is not the case with the
do…while loop. A do…while loop will be executed at least once.
61
Email ThisBlogThis!Share to TwitterShare to Facebook
Which one of the following will set the value of y to 5 if x has the value 3, but not otherwise ?
(A) if (x=3)y=5
(B) if x==3(y=5)
(C) if (x==3);y=5
(D) if (x==3)y=5
ANS:-D
EXPLANATION:-
It is always tricky to answer such questions where options look similar. In such cases it is a better
approach to remove all the apparent wrong options and then go for the tricky ones. In this question
option A is ruled out because it is given as x=3, and = is not a comparison operator but a assignment
operator and so x will be assigned the value of 3 and not compared. so A is ruled out. C is also ruled out
because the presence of a ; at the end of (x==3) makes it as a independent statement and so the next
statement which is y=5 will be executed irrespective of the result of the comparison. So C is ruled out.
Now we are left with only two options. It is either B or D. Since traditionally we enclose the
operator to be compared within parenthesis i would choose D as the right answer. If anyone has
any other explanation please post it to me.
62
Explanation:-
The explanation for this question is very simple. According to the precedence of the different
binary operators in C, * / and % precedes that of + and -. Since the expression enclosed in
parenthesis is executed first, the expression which would be executed first is (13 / 4 * 3). Since
all these operators precedence is the same, they would execute from left to right and so 13 / 4
gets executed first.
13 / 4 = 3
This intermediate answer is multiplied with 3 in order to get the answer 9.
3*3=9
The next expression would be 9 % 5. The result is 4.
% is the mod operator. It gives the remainder of dividing two numbers.
9%5=4
Finally this 4 is added to 1 to get the final result of 5.
It is always better to just know the precedence chart table of the different operators in C.
1. The number of integers between 1 and 250 that are divisible by 2,5 and 7 is
A) 2 (B) 3
C) 5 (D) 8
Ans:- B. There are 3 integers between 1 and 250 that are divisible by 2,5 and 7. They are
70,140 and 210.
2. An undirected graph possess an Eulerian circuit if and only if it is connected and its vertices
are
A) All of even degree (B)All of odd degree
C) Of any degree (D)even in number
Ans:- A. According to Euler's theorem 1, if a graph is undirected then it has an eulerian
circuit if and only if it is connected and each vertex has an even degree.
***It would be useful to know about the Hamiltonian circuit as well.
3. A partially ordered set is said to be a lattice if every two elements in the set have
A)a unique least upper bound (B)a unique greatest lower bound
C)both (A) and (B) (D)none of the above.
63
Ans:- C.
4. The minimum number of edges in a connected graph with 'n' vertices is equal to
A)n(n-1) (B)n(n-1)/2
C)n2 (D)n-1
Ans:- D. The formula for counting the minimum number of edges in a connected graph is
(n-1).
Ans:- C. An astable multivibrator has two states but neither of them are stable.
10. Encoding of data bits 0011 into 7-bit even parity Hamming code is
A)0011110 (B)0101110
C)0010110 (D)0011100
Ans:- A.
The explanation is quite lengthy. If you google the question, you would get a link to the book
"Fundamentals of digital circuit" by A.Anand Kumar. The explanation is great there.
64
declaration.I think those two would still not give errors in c. So 'C' could be the answer for
this question.
To be continued later...
DBMS
In DBMS, there could be a question on different steps in normalization and what is achieved at the end
of every step in it.You need to be knowing the following things very clearly and without any
ambiguity.The question would be based on these terms.
A table is in 1NF if there and no duplicate rows in the table. Each cell is single-valued.
A table is in 2NF if it is in 1NF and if all non-key attributes are dependent on all of the key. A
table is in 2NF if it is in 1NF and if it has no partial dependencies
A superkey is any set of attributes such that the values of the attributes(taken together)uniquely
identify one entity in the entity set.
A primary key is one of the candidate keys, designated by the Database designer.
65
This section is for all those NET exam aspirants who are looking out for a solution for UGC NET computer
science papers. As a person who had taken the examination i have searched the internet incessantly for
the solution of paper-II and paper-III of computer science. Since i could not find any solid help(or rather
no help at all) in this regard, i had decided to write my own blog posting the solution for each and every
paper as and when i complete it. I have posted the solution for paper-II of December 2008(and it was
quite a task). Wherever i could, i have given explanation for the answers. If it is too lengthy or too
simple, i have left it out. Enjoy your preparation for the NET exam.
"Focus on the journey, not the destination. Joy is found not in finishing an activity but in doing it.”
66
in V. If U has n elements and V has m, then the resulting complete bipartite graph can be denoted by K
n,m and the number of edges is given by n*m.
The number of edges = K 3,4 = 3 * 4 = 12
3. The total number of spanning trees that can be drawn using five labeled vertices is:
(A). 125 (B).64
(C ). 36 (D). 16
Ans : A. According to cayley’s formula for counting spanning trees, for a complete graph Kn,
T(Kn)= n n-2 where n is the number of vertices.
T(k5)=5 5-2=5 3= 5 * 5 * 5=125
4. Extremely low power dissipation and low cost per gate can be achieved in
(A) MOS ICS (B) C MOS ICS
(C ) TTL ICS (D) ECL ICS
Ans : B. CMOS ICS
8. Four jobs J1,J2,J3, and J4 are waiting to be run. Their expected run times are 9,6,3 and 5 respectively.
In order to minimize average response time, the jobs should be run in the order:
(A). J1 J2 J3 J4 (B). J4 J3 J2 J1
67
(C ) J3 J4 J1 J2 (D) J3 J4 J2 J1
Ans : D
9. Suppose it takes 100ns to access page table and 20 ns to access associative memory. If the average
access time is 28ns, the corresponding hit rate is:
(A). 100 percent (B). 90 percent
(C ). 80 percent (D). 70 percent
Ans : B
10. Transmission of N signals , each band limited to Fm Hz by TDM, requires a minimum band-width of
(A).fm (B) 2 fm
(C ) N fm (D) 2N fm
Ans : C. Minimum transmission band-width of TDM channel is given by the following equation.
Bt=NW
Where N is the total number of channels, which are bandlimited to ‘W’ Hz. In the above problem, the
number of signals are N, each band limited to Fm Hz and so the minimum band-width is N fm.
11. If a code is ‘t’ error detecting, the minimum hamming distance should be equal to :
(A). t-1 (B). t
(C ). t+1 (D). 2t+1
Ans: C. To guarantee the detection of upto s errors in all cases, the minimum hamming distance in a
block code must be
dmin=s+1
So, the minimum hamming distance for a ‘t’ error detecting must be t+1
68
15. If four 4 input mulitplexers drive a 4 input multiplexer we get a :
(A). 16 input MUX (B). 8 input MUX
(C ). 4 input MUX (D). 2 input MUX
Ans:- A
69
21. N processes are waiting for I/O. A process spends a fraction of its time in I/O wait state. The CPU
utilization is given by:
(A). 1-P –N (B). 1 – P N
(C ). P N (D). P -N
Ans:B. According to the probabilistic model, if a process spends a fraction p of its time in I/O wait state,
and if there are N processes in memory, then the CPU utilization is given by 1-PN
22. If holes are half as large as processes, the fraction of memory wasted in holes is:
(A) 2 / 3 (B). 1 / 2
(C ). 1 / 3 (D). 1 / 5
Ans : D
70
(A). x = 1 (B). compilation error
(C ). x = 20 (D) none of the above
Ans:- C. For the while statement there is a for loop inside. For the for loop, there is one if condition,
based on which there is a break statement. Since the value of x initially is 0, the while condition would
be true and the for loop would start executing. The if statement condition would be checked, since ++x
would become 1 and 1%10 is not equal to 0, break will not be executed. Since for is infinite x value will
go on increasing. Once the value of x reaches 9, ++x would become 10 and 10%10==0 and so break
would be executed. So control will come out of the innermost loop and would go to the outer loop. Sinc
the value of x is 10, and since it is equal to 10, once again the for loop would start its execution. Once
the value of x reaches 20, 20%10 will be equal to 0 and again break will be executed and control would
go to the outer for loop. When the condition is checked for x<=10,it is false as the value of x is 20 and so
it comes out of the while loop and the printf statement gets executed, printing the value of 20.
Whew!!!!! 27. A copy constructor is invoked when : (A). a function returns by value (B). an argument is
passed by value (C ). A function returns by reference (D). none of the above Ans:- B 28. When a language
has the capability to produce new data types, it is said to be : (A). extensible (B). encapsulated (C ).
Overloaded (D). none of the above Ans:-A 29. How many constructors can a class have? (A) Zero (B) 1 (C
) 2 (D) any number Ans:- D 30. An entity has: (i) a set of properties (ii) a set of properties and values for
all the properties (iii) a set of properties and the values for some set of properties may non-uniquely
identify an entity (iv) a set of properties and the values for some set of properties may uniquely identify
an entity Which of the above are valid? (A) (i) only (B) (ii) only (C ) (iii) only (D) (iv) only Ans:- D 31.
Aggregation is: (A) An abstraction through which relationships are treated as lower level entities (B) An
abstraction through which relationships are treated as higher level entities (C) An abstraction through
which relationships are not treated at all as entities (D) None of the above Ans:- B 32. Suppose R is a
relation schema and F is a set of functional dependencies on R. Further, suppose R1 and R2 forma a
decomposition of R. Then the decomposition is a lossless join decomposition of R provided that : (A)
R1∩R2 ->R1 is in F+
(B) R1 ∩ R2->R2 is in F+
(C) Both R1 ∩ R2->R1 and R1 ∩ R2->R3 functional dependencies are in F+
(D)At least one from R1∩R2->R1 and R1 ∩ R2->R2 is in F+
Ans:- D.
33. In a heap, every element is ________________ of all the elements in the subtree.
(A) Maximum (B) minimum
(C ) sum (D) product
Ans:- A
71
35. A high performance switching and multiplexing technology that utilizes fixed length packets to carry
different types of traffic is :
(A) ATM (B) ADSL (C) SONET (D) None of the above
Ans:- A
38. In which addressing mode, the effective address of the operand is generated by adding a constant
value to the contents of a register?
(A) Absolute mode (B) immediate mode (C) indirect mode (D) index mode
Ans:- D
41. In which of the following, ready to execute processes must be present in RAM?
(A) Multiprocessing (B) multiprogramming (C) multitasking (D) all of the above
72
42. If the executing program size is greater than the existing RAM of a computer, it is still possible to
execute the program if the OS supports:
(A) Multitasking (B) virtual memory (C) paging system (D) none of the above
Ans: B
46. Font sizes are usually expressed in points. One point is:
(A) 0.0069 inch (B) 0.0138 inch
(C) 0.0207 inch (D0 0.0276 inch
Ans:- B. One point is 1/72 of an inch and so we will get the answer 0.0138 inch.
47. Assertion (A): Cellular telephone systems can handle a multitude of users.
Reasoning(R ): Cellular telephone systems permit extensive frequency reuse in a small local area.
(A) Both (A) and (R ) are true and (R ) is the correct explanation for (A)
(B) Both (A) and (R ) are true but (R ) is not the correct explanation
(C) (A) is true but (R ) is false
(D) (A) is false but (R ) is true
Ans:- A.
73
49. An example of a data mining algorithm which uses squared error score function is:
(A) CART algorithm (B) back propagation algorithm (C) a priori algorithm
(D) vector space algorithm
Ans:- B. Back propagation algorithm uses squared error score function. CART algorithm uses cross-
validated loss function.
50. (I) Each object in the active directory of windows 2000 has an access control list.
(II) The scheme is a blueprint of all objects in the domain of windows 2000. Which of the following is
true?
(A) Only (I) (B) only (II) (C) both (I) and (II) (d) none of the above
Ans:- C
1. If she is my friend and you are her friend, then we are friends. Given this, the friend relationship in
this context is ________________.
(i) Commutative (ii) transitive (iii) implicative (iv) equivalence
(A) (i) and (ii) (B) (iii) (C) (i),(ii),(iii) and (iv) (D) None of these
Ans:- D
74
11. Recursive functions are executed in a
(A) First in first out order (B) Last in first out order
(C ) Parallel fashion (D) Load Balancing
Ans: B
12. What would be the output of the following program, if run from the commandline as “myprog 1 2
3”?
main(int argc,char *argv[])
{
int i;
i=argv[1]+argv[2]+argv[3];
printf(“%d”,i);
}
(A) 123 (B) 6 (C) Error (D) “123”
Ans:- C
13. A ________________ is a special method used to initialize the instance variable of a class.
(A) Member function (B) Destructor (C) Constructor (D) structure
Ans:- C
14. Encapsulation is
(A) Dynamic binding
(B) A mechanism to associate the code and data
(C ) Data abstraction
(D ) Creating new class
Ans:- B
75
Ans:- D
21. If the number of leaves in a strictly binary tree is an odd number, then what can you say with full
conviction about total number of nodes in a tree?
(A) It is an odd number.
(B) It is an even number.
(C ) It cannot be equal to the number of leaves.
(D ) It is always greater than twice the number of leaves.
Ans:- A. Strictly binary tree with N leaves contains 2N-1 nodes. So when the number of leaves is odd
number then the total number of nodes in the tree also will be odd if we apply the above formula.
76
(A) n (B) n(n-1)/2 (C ) n(n+1)/2 (D) n2/2
Ans:- B. The complete graph on n vertices has n(n-1)/2 edges.
23. At a hill station, the parking lot is one long drive way snaking up a hill side. Cars drive in and park
right behind the car in front of them, one behind another. A car can’t leave until all the cars in front of it
have left. Is the parking lot more like
(A) An array (B) A stack (C) A queue (D) A linked list
Ans:- C.
24. With regard to linked list, which of the following statement is false ?
(A) An algorithm to search for an element in a singly linked list requires O(n) operations in the worst
case.
(B) An algorithm for deleting the first element in a singly linked list requires o(n) operations in the worst
case.
(C ). An algorithm for finding the maximum value in a circular linked list requires o(n) operations.
(D ). An algorithm for deleting the middle node of a circular linked list requires o(n) operations.
Ans:- B
25. A hash function f defined as f(key)=key mod 7, with linear probing used to resolve collisions. Insert
the keys 37,38,72,48,98 and 11 into the table indexed from 0 to 6. What will be the location of 11?
(A) 3 (B) 4 (C ) 5 (D) 6
Ans:- C
26. Device on one network can communicate with devices on another network via a
(A) Hub/switch (B) Utility server
( C) File server (D) Gateway
Ans:- D
27. What is the maximum window size in sliding window protocol used in a computer network?
(A) 4 (B) 8 (C ) 15 (D) 16
Ans:- A
77
30. Match the following:
(i) Ethernet (a) Deterministic
(ii) Token Ring (b) Utilize the full wire speed
(iii) Cut-through switch (c ) Prevent Looping
(iv) Spanning tree (d) Checking valid address
Codes:
(A) i-d,ii-a,iii-b,iv-c (B) i-a,ii-d,iii-b,iv-c
(C ) i-d,ii-d,iii-c,iv-b (D) i-d,ii-c,iii-b,iv-a
Ans:- A
33. A shift-reduce parser carries out the actions specified within braces immediately after reducing with
the corresponding rule of the grammar.
S->xxW* print “1” +
S->y * print “2” +
W->S2 * print “3” }, what is the translation of “x x x x y z z”?
(A) 1 1 2 3 1 (B) 1 1 2 3 3 (C) 2 3 1 3 1 (D) 2 3 3 2 1
Ans:- C
78
36. In the process management Round-robin method is essentially the pre-emptive version of
_______________.
(A) FILO (B) FIFO
(C ) SSF (D) Longest time first
Ans:- B
38. A semaphore count of negative n means (s=-n) that the queue contains ___n__________ waiting
processes.
(A) n + 1 (B) n (C) n – 1 (D) 0
Ans:- B
39. A program is located in the smallest available hole in the memory is ______________
(A) best-fit (B) first-bit (C ) worst-fit (D ) buddy
Ans:- A
40. The unix command used to find out the number of characters in a file is
(A) nc (B) wc (C ) chcnt (D) lc
Ans:- B
41. Software Engineering is a discipline that integrates __________ for the development of computer
software.
(A) Process (B) Methods (C ) Tools (D) All
Ans:- D
42. Any error whose cause cannot be identified anywhere within the software system is called
_________________.
(A) Internal error (B) External error
(C ) Inherent error (D) Logic error
Ans:- B
79
Codes:
(A) (i) (ii) (iv)
(B) (ii) (iii) (iv)
(C) (i) (ii) (iii)
(D) (i) (ii) (iii) (iv)
Ans :- C
45. The name of the transaction file shall be provided by the operator and the file that contains the
edited transactions ready for execution shall be called
(A) Batch.exe (B) Trans.exe (C ) Opt.exe (D) Edit.exe
Ans:- C
50. The unlicensed National Information Infrastructure band operates at the ____________frequency
(A) 2.4 GHz (B) 5 GHz (C ) 33 MHz (D) 5 MHz
Ans:- B
80
Email ThisBlogThis!Share to TwitterShare to Facebook
I am currently handling java programming for my BCA students. Apart from the classroom setting, i feel
this is another forum for my students to interact with me and get their doubts clarified. Many students
feel shy to ask questions in the classroom and keep quiet even if they do not understand a topic. So i am
trying to write on certain specific topics which I am sure lot of students would still be having doubts.
Please go through the topics, and if you want me to answer any particular doubts you have, feel free to
post about them and i will explain it for you here. HAPPY LEARNING!!!!!!.
ARRAYS IN JAVA
APPLET PROGRAMMING
Command line argument is a topic which we practically start our learning of java, but i am sure
still there are students who are not clear about this. Here goes the explanation. Read it more than
once if you are still not clear, you will get it.
Execution in a java program starts from the main method which we write in a class. When we
write any method in java, you can pass parameters to it and the method can also return a
value. Since "main" is also a method, parameters can also be passed to it but the only thing is
that those parameters must be passed from the command line, when you invoke the java
interpreter for executing the class file.
For example, if a class file called test is executed by the java interpreter, and command line arguments
are passed to it, the invocation would like this ,
In the above example, three command line arguments are passed and they are the string one, two and
81
three respectively. The complete program to handle these command line arguments would go like this,
class test
{
public static void main(String args[])
{
/* Arguments sent from the command line are stored in the args array.
Length of the args array would be equal to the no of arguments passed.
Following code simply prints the array elements */
for(int i=0;i<args.length;i++)
System.out.println(args[i]);
}
}
1. Understand very clearly the data type of args. It is a array of strings. That is why it is declared as String
args[]. args is just a variable name given to the array of strings which stores the command line
arguments. It can be called anything, x,y or z.
2. Any data can be sent using command line arguments. But they are always copied into the string array
only. So if any number is passed and should be treated like a number, we should convert it into a int
data type using appropriate methods in java. (Like parseInt method called with the Integer class to
convert the String into primitive int data type).
3. One of the useful applications of command line arguments would be to work with files, let us say.
Suppose i am writing a class called copy which works like any other copy program. copy a source file to a
destination file. The two file names can be given as command line arguments instead of accepting it
from the user.
Here file1 and file2 are command line arguments and there are statements in the copy class to copy file1
into file2.
APPLET PROGRAMMING
Applets are small java programs that are primarily used in internet computing. They are a piece
of code which is downloaded by the browser and run at the client side. Applets can be used for
doing any activity which we want to do. Say, for example, developing a user registration form,
running a game program, a paint application, an EMI calculator etc.
82
Every applet that we write has to be extended from the built in class called Applet. This class is
available in the applet package and so that should be imported. An example program for an
applet would include an import statement for importing the applet package.
import java.applet.*;
import java.awt.*;
The awt package must be imported because it contains the Graphics class which is going to used
in applet programming. Because of that reason, awt package also must be imported.
Let us say, we want to write a applet called testapp then the class definition for it should go like
this,
There are many methods executed in the life cycle of applet and they are
init()
start()
This method is executed once init() finishes its execution. When a web page which contains the
applet gets its focus, this method will be executed. So in the life cycle of an applet, this method
could be executed more than once.
stop()
This is executed when a web page containing an applet loses its focus.
destroy()
This is the last method to be executed in the applet's life cycle and this will be executed only
once.
83
Apart from all these methods, we should be familiar with one more method which would be
frequently used in our learning of applet and it is the paint mehtod.
import java.applet.*;
import java.awt.*;
public class testapp extends Applet
{
public void paint(Graphics g)
{
g.drawString("Hello world",100,100);
}
}
Just like how, values can be passed to the main method using command line arguments, we can
also pass arguments to an applet. The arguments are passed using the PARAM tag using a name
and value attribute. In the init method of the applet the parameter's values have to be captured
and worked further upon. Let me first write the java program to capture the arguments. ;
import java.awt.*;
import java.applet.*
public class testparam
{
String str=" ";
public void init()
{
str=getParameter("name");
repaint();
}
public void paint(Graphics g)
{
g.drawString(str,200,200);
}
}
The second part is to write the html code which has the applet embedded and also the param tag
for passing the parameters.
84
< html >
< body >
< applet code="testparam" width=400 height=400 >
< param name="name" value="JAVA" >
< body >
< html >
The question bank comprises of PART A and PART B questions. PART A questions are 1 mark or 3 mark
questions. PART B comprises of 7 mark questions.
PART A
PART B
PART A
85
21. Write a simple html file for embedding a applet.
22. Name some methods available in the Graphics class for drawing purpose.
23. What are the attributes available with applet tag?. Explain few of them.
24. What is the difference between byte stream and character stream classes?
25. What is the purpose of pushbackinput stream class?
26. What is the purpose of piped stream class?
27. Name some methods available with inputstream class?
28. Name some methods available with outputstream class?
29. What are the different modes of opening a file using Randomaccessfile class?
29. How to draw a polygon in java?
30. Name some important events available in java.
PART B
86
ARRAYS IN JAVA
Here i am assuming that the readers will know about how arrays are handled in c and c++. The
main focus is on how java handles arrays and what are the unique features in its declaration.
In c or c++, whenever we declare an array we have to mention the size of the array(i am not
talking about dynamic allocation of arrays using malloc or new operator). But in java when an
array is declared you just mention that it is an array by writing empty square brackets next to the
name of the array.
For example, if we want to declare an integer array which will be called as arr,
the declaration would go like this,
int arr[];
The size of the array would be mentioned when memory is allocated for it.
arr=new int[5];
Memory for the array arr is allocated and arr contains the reference to the set of five contiguous
memory locations.
Points to be noted:
class jaggedarr
{
public static void main(String ar[])
{
int twodim[][];
twodim=new int[3][];
int i,j;
for(i=0;i<twodim.length;i++)
{
twodim[i]=new int[i+1];
for(j=0;j<twodim[i].length;j++)
{
twodim[i][j]=1;
System.out.print(twodim[i][j]+" ");
87
}
System.out.println();
}
}
}
In the above example, the array twodim is declared as one having 3 rows, but the number of
columns are given based on the value of i. So, the first row has one column, second row has two
columns and third row has three columns.
88