Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Sample Paper Sample Paper Sample Paper Sample Paper

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Sample Paper

Faculty of Engineering
Computer Science and Information Technology
Max. Marks 100
________________________________________________________________________
Attempt all 50 questions, each question carries 02 marks. There is no negative
Marking. Please mark the correct answer as A/B/C/D at appropriate place, on the
right hand side of the question, in blue or black ink.
________________________________________________________________________
1. Consider different activities related to email.
m1: Send an email from a mail client to a mail server m2: Download an email from mailbox server to a
mail client m3: Checking email in a web browser which is the application level protocol used in each
activity?
(A) m1: HTTP m2: SMTP m3: POP
(B) m1: SMTP m2: FTP m3: HTTP
(C) m1: SMTP m2: POP m3: HTTP
(D) m1: POP m2: SMTP m3: IMAP
[
]
2. HTML (Hyper Text Markup Language) has language elements which permit certain actions other than
describing the structure of the web document. Which one of the following actions is NOT supported by
pure HTML (without any server or client side scripting) pages?
(A) Embed web objects from different sites into the same page
(B) Refresh the page automatically after a specified interval
(C) Automatically redirect to another page upon download
(D) Display the client time as part of the page

3. Which one of the following is NOT desired in a good Software Requirement Specifications (SRS)
document?
(A) Functional Requirements
(B) Non-Functional Requirements
(C) Goals of Implementation
(D) Algorithms for Software Implementation [
]
4. Consider a relational table with a single record for each registered student with the following attributes.
A. Registration_Num: Unique registration number of each registered student
1

B. UID: Unique identity number, unique at the national level for each citizen
C. BankAccount_Num: Unique account number at the bank. A student can have multiple
D. Name: Name of student
F. Hostel Room: Room number of the hostel
Which of the following options is INCORRECT?
(A) Bank Account_Num is a candidate key
(B) Registration_Num can be a primary key
(C) UID is a candidate key if all students are from the same country
(D) If S is a super key such that SUID is NULL then SUID is also a super key

5. A company needs to develop a strategy for software product development for which it has a choice of two
programming languages L1 and L2. The number of lines of code (LOC) developed using L2 is estimated
to be twice the LOC developed with L1. The product will have to be maintained for five years. Various
parameters for the company are given in the table below.
Parameter
Language L1
Language L
Man years needed for development LOC/10000
LOC/10000
Development Cost per man year
Rs. 10,00,000
Rs. 7,50,000
Maintenance time
5 years
5 years
Cost of maintenance per year
Rs. 1,00,000
Rs. 50,000
Total cost of the project includes cost of development and maintenance. What is the LOC for L1 for
which the cost of the project using L1 is equal to the cost of the project using L2?
(A) 4000
(C) 4333

(B) 5000
(D) 4667

6. In a compiler, keywords of a language are recognized during


(A) Parsing of the program
(B) The code generation
(C) The lexical analysis of the program
(D) Dataflow analysis

7. Let P be a regular language and Q be a context-free language such that Q P. For example Let P be the
language represented by the regular expression p*q* and be (pn qn| n N) . Then which of the following
ALWAYS regular?
(A) P Q
(B) P Q
(C) * P
(D) *
[
]
8. Let the page fault service time be 10 ms in a computer with average memory access time being 20 ns. If
one page fault is generated for every 106 memory access, what is the effective access time for the
memory?
2

(A) 21 ns
(C) 23 ns

(B) 30 ns
(D) 35 ns

9. The lexical analysis for a modern computer language such as Java needs the power of which one of the
following machine models in a necessary and sufficient sense?
(A) Finite state automata
(B) Deterministic pushdown automata
(C) Non-deterministic pushdown automata
(D) Turing machine
[
]
10. A thread is usually defined as a light weight process because an operating system (OS) maintains
smaller data structures for a thread than for a process. In relation to this, which of the following is TRUE?
(A) On per-thread basis, the OS maintains only CPU register state
(B) The OS does not maintain a separate stack for each thread
(C) On per-thread basis, the OS does not maintain virtual memory state
(D) On per-thread basis, the OS maintains only scheduling and accounting information
[
]

11. Database table by name Loan Records is given below.


Borrower
Bank_Manager
Ramesh
Sunderajan
Suresh
Ramgopal
Mahesh
Sunderajan

Loan_Amount
10000.00
5000.00
7000.00

What is the output of the following SQL query? SELECT count (*) FROM ((SELECT Borrower, Bank
Manager FROM Loan Records) AS S NATURAL JOIN (SELECT Bank Manager, Loan Amount FROM
Loan Records) AS T);
(A) 3
(C) 5

(B) 9
(D) 6

12. An application loads 100 libraries at startup. Loading each library requires exactly one disk access. The
seek time of the disk to a random location is given as 10 ms. Rotational speed of disk is 6000 rpm. If all
100 libraries are loaded from random locations on the disk, how long does it take to load all libraries?
(The time to transfer data from the disk block once the head has been positioned at the start of the block
may be neglected.)
(A) 0.50 s
(B) 1.50 s
(C) 1.25 s
(D) 1.00 s
[
]
13. Which of the following problems is undecidable?
(A) Membership problem of CFLs
(B) Ambiguity problem of CFGs
(C) Finiteness problem for FSAs
(D) Equivalence problem for FSAs
14. Which of the following is TRUE?
(A) Every subset of a regular set is regular.
(B) Every finite subset of a non-regular set is regular
(C) The union of two non-regular sets is not regular
3

(D) Infinite union of finite set is regular

15. The height of a binary tree is the maximum number of edges in any root to leaf path. The maximum
number of nodes in a binary tree of height h is:
h

h-1

(A) 2 1

(B) 2

h+1

(C) 2

-1
h+1

-1

(D) 2

16. Which of the following sorting algorithms has the lowest worst-case complexity?
(A) Merge sort
(B) Bubble sort
(C) Quick sort
(D) Selection sort

17. Consider the following segment of C code:


int j, n;
j = 1;
While (j <= n)
j = j *2;
The number of comparisons made in the execution of the loop for any n > 0 is
(B) n
(A) [log 2 n] + 1
(C) [ log 2 n]
(D) [ log 2 n ] +1

18. Which of the following is a top-down parser?


(A) Recursive descent parser
(B) Operator precedence parser
(C) An LR(k) parser
(D) An LALR(k) parser

19. Define the connective * for the Boolean variables X and Y as: X*Y = XY + XY. Let Z=X*Y.
Consider the following expressions P, Q and R.
P: X = Y*Z Q: Y=X*Z R: X*Y*Z = 1
Which of the following is TRUE?
(A) Only P and Q are valid.
(B) Only Q and R are valid.
(C) Only P and R are valid.
(D) All P, Q and R are valid.
[
]

20. The following postfix expression with single digit operands is evaluated using a stack:
823^/23*+51*Note that ^ is the exponentiation operator. The top two elements of the stack after the first * is evaluated
are:
(A) 6, 1

(B) 5, 7

(C) 3, 2

(D) 1, 5

21. The in order and preorder traversal of a binary tree are d b e a f c g and a b d e c f g, respectively. The
post order traversal of the binary tree is
(A) debfgca

(B) edbgfca

(C) edbfgca

(D) defgbca

22. In an un-weighted, undirected connected graph, the shortest path from a node S to every other node is
computed most efficiently, in terms of time complexity, by
(A) Dijkstras algorithm starting from S.
(B) Warshalls algorithm
(C) Performing a DFS starting from S
(D) Performing a BFS starting from S
[
]
23. Consider the following C function
Int f ( int n)
{Static int r=0;
if (n<= 0) return 1;
if (n > 3)
{r = n;
return f(n-2) +2;
}
return f(n-1) +r;
}
What is the value of f(5)?
(A) 5
(C) 9

(B) 7
(D) 18

24. A complete n-array tree is a tree in which each node has n children or no children. Let l be the number
of internal nodes and L be the number of leaves in a complete n-ary tree. If L = 41 amd I = 10, what is
the value of n?
(A) 3
(B) 4
(C) 5
(D) 6
[
]
25. What is the time complexity of the following recursive function?
Int DoSomething (int n) {
If (n<=2)
Return I;
Else
Return (Do Something (floor (sqrt (n) + n) ;
}
2

(A) (n )
(C) (log2 n)

(B) (n log2 n)
(D) (log2 log2 n)
5

26. The minimum number of page frames that must be allocated to a running process in a virtual memory
environment is determined by
(A) The instruction set architecture
(B) Page size
(C) Physical memory size
(D) Number of processes in memory
[
]
27. Suppose the round trip propagation delay for a 10 Mbps Ethernet having 48-bit jamming signal is 46.4
ms. the minimum frame size is:
(A) 94
(B) 416
(C) 464
(D) 512
[
]
28.The relation scheme Student Performance (name, courseNo, rollNo, grade) has the following
functional dependencies:
(A) Name, courseNo -> grade
(B) rollNo, courseNo -> grade
(C) name -> rollNo
(D) rollNo -> name
The highest normal form of this relation scheme is
[
]

29. An operating system uses Shortest Remaining Time first (SRT) process scheduling algorithm.
Consider the arrival times and execution times for the following processes:

What is the total waiting time for process P2?


(A) 5
(C) 40

(B) 15
(D) 55

30. Two processes, P1 and P2, neeed to access a critical section of code. Consider the following
synchronization construct used by the processes: /* P1 */
while (true)
{ wants1 = true;
while (wants2 == true);
/* critical section */ wants1 = false;
}
/* Remainder section */
/* P2 */
while (true) {
wants2 = true;
6

while (wants1 == true);


/* critical section */
wants2 + false;
}
/* Remainder section */
Here, wants1 and wants2 are shared variables, which are initialized to false. Which one of the following
statements is TRUE about the above construct?
(A) It does not ensure mutual exclusion.
(B) It does not ensure bounded waiting.
(C) It requires that processes enter the critical section in strict alternation.
(D) It does not prevent deadlocks, but ensures mutual exclusion.

Consider the following Finite State Automaton:

31. The language accepted by this automaton is given by the regular expression
(A) b*ab*ab*ab*
(B) (a+b)*
(C) b*a(a+b)*
(D) b*ab*ab*

32. The minimum state automaton equivalent to the above FSA has the following number of states
(A) 1
(B) 2
(C) 3
(D) 4
[

33. A company needs to develop digital signal processing software for one of its newest inventions. The
software is expected to have 40000 lines of code. The company needs to determine the effort in person
months needed to develop this software using the basic COCOMO model. The multiplicative factor for
this model is given as 2.8 for the software development on embedded systems while the exponentiation
factor is given as 1.20. What is the estimated effort in person-months?
(A) 234.25

(B) 932.50
7

(C) 287.80

(D) 122.40

34. Let the time taken to switch between user and kernel modes of execution be t1 while the time taken to
switch between two processes be t2 . Which of the following is TRUE?
(A) t1>t2
(B) t1=t2
(C) t1<t2
(D) Nothing can be said about the relation between and
[
]
35. Consider a hypothetical processor with an instruction of type LW R1, 20(R2), which during execution
reads a 32-bit word from memory and stores it in a 32-bit register R1. The effective address of the
memory location is obtained by the addition of a constant 20 and the contents of register R2. Which of
the following best reflects the addressing mode implemented by this instruction for the operand in
memory?
(A) Immediate Addressing
(B) Register Addressing
(C) Register Indirect Scaled Addressing
(D) Base Indexed Addressing
[
]
36. On a non-pipelined sequential processor, a program segment, which is a part of the interrupt service
routine, is given to transfer 500 bytes from an I/O device to memory.
Initialize the address register
Initialize the count to 500
Loop: Load a byte from device Store in memory at address given by address register Increment the
address register Decrement the count If count! = 0 go to LOOP
Assume that each statement in this program is equivalent to a machine instruction which takes one clock
cycle to execute if it is a non-load/store instruction. The load-store instructions take two clock cycles to
execute.
The designer of the system also has an alternate approach of using the DMA controller to implement the
same transfer. The DMA controller requires 20 clock cycles for initialization and other overheads. Each
DMA transfer cycle takes two clock cycles to transfer one byte of data from the device to the memory.
What is the approximate speedup when the DMA controller based design is used in place of the interrupt
driven program based input-output?
(A) 3.4
(B) 4.4
(C) 5.1
(D) 6.7
[
]
37. An application loads 100 libraries at startup. Loading each library requires exactly one disk access.
The seek time of the disk to a random location is given as 10 ms. Rotational speed of disk is 6000 rpm.
If all 100 libraries are loaded from random locations on the disk, how long does it take to load all
libraries? (The time to transfer data from the disk block once the head has been positioned at the start
of the block may be neglected.)
(A) 0.50 s

(B) 1.50 s

(C) 1.25 s

(D) 1.00 s

38. An 8KB direct-mapped write-bank cache is organized as multiple blocks, each of size 32-bytes. The
processor generates 32-bit addresses. The cache controller maintains the tag information for each
cache block comprising of the following.
1 Valid bit
1 Modified bit
As many bits as the minimum needed to identify the memory block mapped in the cache. What is the
total size of memory needed at the cache controller to store meta-data (tags) for the cache?
(A) 4864 bits

(B) 6144 bits

(C) 6656 bits

(D) 5376 bits

39. Consider an instruction pipeline with four stages (S1, S2, S3 and S4) each with combinational circuit
only. The pipeline registers are required between each stage and at the end of the last stage. Delays for
the stages and for the pipeline registers are as given in the figure.

What is the approximate speed up of the pipeline in steady state under ideal conditions when compared to
the corresponding non-pipeline implementation?
(A) 4.0
(B) 2.5
(C) 1.1
(D) 3.0
[
]

Consider a network with five nodes, N1 to N5, as shown below.

The network uses a Distance Vector Routing protocol. Once the routes have stabilized, the distance
vectors at different nodes are as following. N1: (0, 1, 7, 8, 4) N2: (1, 0, 6, 7, 3) N3: (7, 6, 0, 2, 6) N4: (8, 7,
2, 0, 4) N5: (4, 3, 6, 4, 0) Each distance vector is the distance of the best known path at the instance to
nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in
both directions. In each round, all nodes exchange their distance vectors with their respective neighbors.
Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will
cause the two incident nodes to change only that entry in their distance vectors.
40. The cost of link N2-N3 reduces to 2(in both directions). After the next round of updates, what will be
the new distance vector at node, N3.
(A) (3, 2, 0, 2, 5)
(B) (3, 2, 0, 2, 6)
(C) (7, 2, 0, 2, 5)
(D) (7, 2, 0, 2, 6)
[
]
41. After the update in the previous question, the link N1-N2 goes down. N2 will reflect this change
immediately in its distance vector as cost, 8. After the NEXT ROUND of update, what will be the cost to
N1 in the distance vector of N3?
(A) 3
(B) 9
(C) 10
(D) 8
[
]
42. Which of the following pairs have DIFFERENT expressive power?
(A) Deterministic finite automata (DFA) and Non-deterministic finite automata (NFA)
(B) Deterministic push down automata (DPDA) and Non-deterministic push down automata (NPDA)
(C) Deterministic single-tape Turing machine and Non-deterministic single-tape Turing machine
(D) Single-tape Turing machine and multi-tape Turing machine
[
]
43. Which does the following fragment of C program print?
Char c [] = GATE2011;
char *p = c;
printf(%s, p + p[3] p [11]);
(A) GATE2011
(B) E2011
(C) 2011
(D) 011

44. An application loads 100 libraries at startup. Loading each library requires exactly one disk access.
The seek time of the disk to a random location is given as 10 ms. Rotational speed of disk is 6000 rpm.
If all 100 libraries are loaded from random locations on the disk, how long does it take to load all
libraries? (The time to transfer data from the disk block once the head has been positioned at the start
of the block may be neglected.)
(A) 0.50 s

(B) 1.50 s

(C) 1.25 s

(D) 1.00 s

10

45. A minimum state deterministic finite automaton accepting the language L={w|w {0,1}*, number of
0s and 1s are divisible by 3 and 5, respectively has
(A) 15 states
(B) 11 states
(C) 10 states
(D) 9 states
[
]

46. The following postfix expression with single digit operands is evaluated using a stack:
823^/23*+51*Note that ^ is the exponentiation operator. The top two elements of
the stack after the first * is
evaluated are:
(A) 6, 1
(B) 5,7
(C) 3,2
(D) 1,5
[
]
47. A complete n-ary tree is a tree in which each node has n children or no children. Let l be the number of
internal nodes and L be the number of leaves in a complete n-ary tree. If L = 41 amd I = 10, what is
the value of n?
(A) 3
(B) 4
(C) 5
(D) 6
[
]
48. Let w be the minimum weight among all the edge weights in an undirected connected graph. Let e be a
specific edge of weight w. Which of the following is FALSE?
(A) There is a minimum spanning tree containing e.
(B) If e is not in a minimum spanning tree T, then in the cycle formed by adding e to T, all edges have
the same weight.
(C) Every minimum spanning tree has an edge of weight w.
(D) e is present in every minimum spanning tree.

49. An array of n numbers is given, where n is an even number. The maximum as well as the minimum
of these n numbers needs to be determined. Which of the following is TRUE about the number of
comparisons needed?
(A) At least 2n c comparisons, for some constant c, are needed.
(B) At most 1,5n 2 comparisons are needed.
(C) At least nlog2 n comparisons are needed.
(D) None of the above.

50.Which of the following is the Huffman code for the letters a,n,c,d,e,f?
11

(A) 0,10,110,1110,11110,11111
(B) 11,10,011,010,001,000
(C) 11,10,01,001,0001,0000
(D) 110,100,010,000,001,111

12

You might also like