This action might not be possible to undo. Are you sure you want to continue?

Welcome to Scribd! Start your free trial and access books, documents and more.Find out more

Let the clock cycles required for various operations be as follows: Register to/from memory transfer : 3 clock cycles ADD with both operands in register : 1 clock cycle Instruction fetch and decode : 2 clock cycles per word The total number of clock cycles required to execute the program is Options Correct Answer A) 29 B) 24 C) 23 D) 20 B The order of an internal node in a B+ tree index is the maximum number of children it can have. Suppose that a child pointer takes 6 bytes, the search field value takes 14 bytes, and the block size is 512 bytes. What is the order of the internal node? A) 24 B) 25 C) 26 D) 27 C The Boolean function x, y, + xy + x, y A) x, + y, B) x + y C) x + y, D) x, + y D In an MxN matrix such that all non-zero entries are covered in a rows and b columns. Then the maximum number of non-zero entries, such that no two are on the same row or column, is A) a + b B) max {a, b} C) min {M-a, N-b} D) min {a, b}

2

Options Correct Answer 3 Options Correct Answer

4

Options

courseNo. R2 . Rl Memory[5000] 2 MOV R2.5000 . Memory[6000] R2 2 Consider that the memory is byte addressable with size 32 bits. grade) has the following functional dependencies: name. R2 and R3. and the program has been loaded starting from memory location 1000 (decimal). Then. R2 R2 + R3 . Instruction Operation Instruction Size (in words) 5 Correct Answer 6 Options Correct Answer MOV Rl. the return address (in decimal) saved in the stack will be Options Correct Answer 8 Options Correct Answer A) 1007 B) 1020 C) 1024 D) 1028 A Let G be a simple graph with 20 vertices and 100 edges.(R1) . rollNo. If an interrupt occurs while the CPU has been halted after executing the HALT instruction.R3 HALT . courseNo grade name rollNo rollNo name The highest normal form of this relation scheme is A 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 D Consider the following program segment for a hypothetical CPU having three user registers Rl. the size of the maximum independent set of G is A) 12 B) 8 C) Less than 8 D) More than 12 A .Correct Answer A The relation scheme Student Performance (name. R2 Memory[(Rl)] 1 7 ADD R2. The size of the minimum vertex cover of G is 8. Machine halts 1 1 MOV 6000. courseNo grade rollNo.

x = m.n). } print (x) . else n=n-m. while (x . y. > 0). &x.9 What does the following algorithm approximate? (Assume m > 1.3. B) Options A) log m m2 C) m1/2 Correct Answer C D) m1/3 10 Consider the following C program main () { int x. Initially. scanf ("%d %d". / * Assume x > 0 and y > 0 * / m = x. n . The level-order traversal of the heap is given below: 10.} printf("%d". m. using repeated subtraction B) x mod y using repeated subtraction C) the greatest common divisor of x and y D) the least common multiple of x and y C The best data structure to check whether an arithmetic expression has balanced parentheses is a A) queue B) stack C) tree D) list B A Priority-Queue is implemented as a Max-Heap. The level-order traversal of the heap after the insertion of the elements is 12 . y-i.y > ) { x = (x + y) / 2 . 8. &y). n = y . y = m/x . while ( m ! = n) { if (m > n) m = m � n. } The program computes Options Correct Answer 11 Options Correct Answer A) x + y. it has 5 elements.5.2 Two new elements 1 and 7 are inserted in the heap in that order.

int DoSomething (struct CellNode *ptr) { int value = 0 .1 B) 10.3.0.4 s.3.> rightChild)) .5 C) 10. }.> rightChild ! = NULL) value = max (value. } return (value).0 D Suppose the round trip propagation delay for a 10 Mbps Ethernet having 48-bit jamming signal is 46.252.8.7.1.7. if (ptr .0 B) 255.3.7.5.2.2.0 C) 255. if (ptr ! = NULL) { if (ptr->leftChild ! = NULL) value = 1 + DoSomething (ptr .8.> leftChild) . The minimum frame size is: A) 94 B) 416 C) 464 D) 512 C Consider the following C program segment: 16 char p [ 20].255. struct CellNode *rightChild .2.255.1.8.8. } The value returned by the function DoSomething when a pointer to the root of a non-empty tree is passed as argument is 13 Options Correct Answer 14 Options Correct Answer 15 Options Correct Answer A) The number of leaf nodes in the tree B) The number of nodes in the tree C) The number of internal nodes in the tree D) The height of the tree D An organization has a class B network and wishes to form subnets for 64 departments. .Options Correct Answer A) 10.5 D Consider the following C program segment struct CellNode { struct CellNode *leftChild . The subnet mask would be A) 255.255. int element.2.3.1.5 D) 10. 1 + DoSomething (ptr .128.64.7.0 D) 255.255.

print f (�%d. i++) p[ i ] = s [length . %d / n�.char * s = "string" . int length = strlen (s) . i < length.5. } else {a . The following relationship holds good A) n1< n2 < n3 B) n1= n3 < n2 C) n1= n2 = n3 D) n1 n3 n2 B Consider the following C function: int f (int n) { static int i = 1. print f ("%s". print f (� %d. v be the values printed by the parent process. a. %d / n�. n = n + i. LR(1) and LALR(1) parsers for the grammar be n1.i] . } The value returned by f(1) is A) 5 B) 6 C) 7 D) 8 C Consider the following code fragment: if (fork ( ) = = 0) 19 {a = a + 5. n2 and n3 respectively.& a). } Let u. p) . return f (n). if (n >= 5) return n. y be the values printed by the child process. and a). for (i = 0 . a. Which one of the following is TRUE? Options Correct Answer A) u = x + 10 and v = y B) u = x + 10 and v y C) u + 10 =x and v = y D) u + 10 = x and v y B 17 Options Correct Answer 18 Options Correct Answer . The output of the program is Correct Answer A Consider the grammar S (S) | a Let the number of states in SLR(1). and x. i ++.

What is the number of clock cycles taken to complete the above sequence of instructions starting from the fetch of I1? Options .co Enter your search terms Submit search form Search Web freshersworld. y) B) call swap (&x. What is the height of the binary search tree (the height is the maximum distance of a leaf node from the root)? A) 2 B) 3 C) 4 D) 6 B Options Correct Answer freshersw orld. WB . &y) C) swap (x. R2 <= R2 . 12.Instruction fetch from instruction memory.G Defence Careers | GATE | GRE | MBA | Scholarships | Freshers Directory | Higher Studies | Build Resume | BPO jobs | Interview Tips Contact US|Tell A Friend|| Advertise with Us | FAQ| Sign Up | President's Note Consider the following C function void swap (int a.R0 Let each stage take one clock cycle. R0. R0 <= M[1oc1] I2 : A R0. Consider the following sequence of instructions: I1 : L R0.Register write back. 16. RD . 15. MA . } In order to exchange the values of two variables x and y. 1oc1. 1. a= b.Data memory access . 3. b = temp . R0 <= R0 + R0 I3: A R2.com 1 en ISO-8859-1 ISO-8859-1 active pub-7447756575 GALT:#008000. y) cannot be used as it does D) swap (x.20 The following numbers are inserted into an empty binary search tree in the given order: 10. temp = a . EX . int b) { int temp . y) cannot be used as the parameters not return any value are passed by value Your Answer (Not Answered) Correct Answer B 2 A 5 stage pipelined CPU has the following sequence of stages: IF . Options A) call swap (x.Instruction decode and register read. the register read at RD stage is used. 5. R0.Execute: ALU operation for data and address computation.for write access.

17 D) 5. The number of tuples in the Student and Enroll tables are 120 and 8 respectively. courseno. 22 C) 15. 8 C) 960. 8 B) 120. 17 Your Answer (Not Answered) Correct Answer A 6 Which one of the following is a key factor for preferring B+ -trees to binary search trees for indexing database relations? Options A) Database relations have a large number of B) Database relations are sorted on the records primary key + C) B -trees require less memory than binary D) Data transfer from disks is in blocks search trees Your Answer (Not Answered) Correct Answer D 7 The goal of structured programming is to Options B) be able to infer the flow of control from the A) have well indented programs compiled code C) be able to infer the flow of control from D) avoid the use of GOTO statements the program text Your Answer (Not Answered) Correct Answer C 8 The tightest lower bound on the number of comparisons. where �*�denotes natural join? Options A) 8. address) Enroll (rollno.A) 8 B) 10 C) 12 D) 15 Your Answer (Not Answered) Correct Answer A 3 The address resolution protocol (ARP) is used for Options B) Finding the IP address of the default A) Finding the IP address from the DNS gateway C) Finding the IP address that corresponds to D) Finding the MAC address that corresponds a MAC address to an IP address Your Answer (Not Answered) Correct Answer D 4 Consider the following relation schema pertaining to a students database: Student (rollno. What are the maximum and minimum number of tuples that can be present in (Student * Enroll). The CPU generates 32 bit addresses. 8 D) 960. for comparison-based sorting is of the order of Options A) n B) n2 C) n log n D) n log2 n Your Answer (Not Answered) Correct Answer B 9 Consider the following two problems on undirected graphs a: Given G(V. name. 120 Your Answer (Not Answered) Correct Answer C 5 Consider a direct mapped cache of size 32 KB with block size 32 bytes. does G have an independent set of size |V| -4? b: Given G(V. does G have an independent set of size 5? Which one of the following is TRUE? Options A) is in P and is NP-complete B) is NP-complete and is in P . The number of bits needed for cache indexing and the number of tag bits are respectively Options A) 10. coursename) where the primary keys are shown underlined. E). in the worst ease. E). 17 B) 10.

value} F num {F.value = F. E + n and E + E x n C) n. The size of the minimum vertex cover of G is 8. n + n and n + n x n D) n. collide. where # is a special symbol L3 = {ww | w {0. E + n and E x n Your Answer (Not Answered) Correct Answer D 14 Consider the grammar with the following translation rules and E as the start symbol. The probability that A wins the second backoff race is Options A) 0.value } | F {T. and (iii) the result of merging B and C gives A? Options A) 2 B) 30 C) 56 D) 256 Your Answer (Not Answered) Correct Answer D 16 Which one of the following is true for a CPU having a single interrupt request line and a single interrrupt grant line? Options A) Neither vectored interrupt nor multiple B) Vectored interrupts are not possible but . 1}*} L2 = {w# wR | w {0. At the end of this successful transmission by A. the size of the maximum independent set of G is Options A) 12 B) 8 C) Less than 8 D) More than 12 Your Answer (Not Answered) Correct Answer A 12 A and B are the only two stations on an Ethernet.value } Compute E.value + F. E + n and E + n x n B) n.5 B) 0. and A wins the first backoff race. Options A) 200 B) 180 C) 160 D) 40 Your Answer (Not Answered) Correct Answer C 15 Let A be a sequence of 8 distinct integers sorted in ascending order. E E1 # T {E. 1}*} Which one of the following is TRUE? Options A) L1 is a deterministic CFL B) L2 is a deterministic CFL C) L3 is a CFL.value = T1. value for the root of the parse tree for the expression: 2 # 3 & 5 # 6 & 4.0 Your Answer (Not Answered) Correct Answer A 13 Consider the grammar EE+n|Exn|n For a sentence n + n x n.value } T T1 & F { T. the handles in the right-sentential form of the reduction are Options A) n.value = T.C) Both and are NP-complete D) Both and are in P Your Answer (Not Answered) Correct Answer C 10 Consider the languages L1 = {wwR | w {0.value } | T {E. (ii) B has 5 and C has 3 elements. Each has a steady queue of frames to send.75 D) 1. both A and B attempt to transmit and collide. Then.value = num. 1}*}.value * T. Both A and B attempt to transmit a frame. How many distinct pairs of sequences.value = E1. but not a deterministic CFL D) L3 is a deterministic CFL Your Answer (Not Answered) Correct Answer B 11 Let G be a simple graph with 20 vertices and 100 edges. B and C are there such that (i) each is sorted in ascending order.625 C) 0.

BE. DEH Your Answer (Not Answered) Correct Answer D 18 In a network of LANs connected by bridges. B. packets are sent from one LAN to another through intermediate bridges. }.> leftChild) . D. E C. if (ptr . BC D. Why is the spanning tree algorithm used for bridge-routing? Options A) For shortest path routing between LANs B) For avoiding loops in the routing paths C) For fault tolerance D) For minimizing collisions Your Answer (Not Answered) Correct Answer B 19 Suppose T(n) = 2T (n/2) + n.> rightChild)) . BCH D) AEH. DE C) AEH. packets may have to be routed through multiple bridges. What are the candidate keys of R? Options A) AE.> rightChild ! = NULL) value = max (value. interrupting devices are not possible. Since more than one path may exist between two LANs. C. if (ptr ! = NULL) { if (ptr->leftChild ! = NULL) value = 1 + DoSomething (ptr . T(0) = T(1) = 1 Which one of the following is FALSE? Options A) T(n) = O(n2 ) B) T(n) = (n log n) C) T(n) = (n2) D) T(n) = O(n log n) Your Answer (Not Answered) Correct Answer B 20 Consider the following C program segment struct CellNode { struct CellNode *leftChild . int DoSomething (struct CellNode *ptr) { int value = 0 . 1 + DoSomething (ptr . E. struct CellNode *rightChild . BE B) AE. multiple interrupting devices are possible. BEH. } return (value). C) Vectored interrupts and multiple D) Vectored interrupt is possible but multiple interrupting devices are both possible. H) on which the following functional dependencies hold : (A B. BEH. D A). } The value returned by the function DoSomething when a pointer to the root of a non-empty tree is passed as argument is Options . int element. Your Answer (Not Answered) Correct Answer B 17 Consider a relation scheme R = (A.interrupting devices are possible.

16 B) 10. E C. } print (x) . BCH D) AEH. What are the candidate keys of R? Options A) AE. y-i. while (x . OR and NOT gates may be used. BE B) AE. 13 D) 8. D A).1 by 0001.. BC D. 11 Your Answer (Not Answered) Correct Answer D 6 In a packet switching network. 12 C) 9. A combinational circuit is to be designed which takes these 4 bits as input and outputs 1 if the digit � 5. BE.y > ) { x = (x + y) / 2 .. what is the minimum number of gates required? Options A) 2 B) 3 C) 4 D) 5 Your Answer (Not Answered) Correct Answer C 5 If 73x (in base-x number system) is equal to 54y (in base-y number system). then the optimum packet size is Options A) 4 B) 6 C) 7 D) 9 . E. 9 by 1001. C. DE C) AEH.A) The number of leaf nodes in the tree B) The number of nodes in the tree C) The number of internal nodes in the tree D) The height of the tree Your Answer (Not Answered) Ans d What does the following algorithm approximate? (Assume m > 1. and 0 otherwise. Options B) A) log m m2 C) m1/2 D) m1/3 Your Answer (Not Answered) Correct Answer C 2 The problems 3-SAT and 2-SAT are Options A) both in P B) both NP-complete C) NP-complete and in P respectively D) undecidable and NP-complete respectively Your Answer (Not Answered) Correct Answer C 3 Consider a relation scheme R = (A. H) on which the following functional dependencies hold : (A B... DEH Your Answer (Not Answered) Correct Answer D 4 A circuit outputs a digit in the form of 4 bits. If the message size is 24 bytes and each packet contains a header of 3 bytes. packets are routed from source to destination along a single path having two intermediate nodes. 0 is represented by 0000. y = m/x . D. > 0). x = m. If only AND. BEH. BEH. B. the possible values of x and y are Options A) 8.

Your Answer (Not Answered) Correct Answer D 7 Consider the following program fragment for reversing the digits in a given integer to obtain a new integer. Let n = d1d2.... Rl Memory[5000] 2 MOV R2.. Instruction Operation Instruction Size (in words) MOV Rl.dm-i+1 B) n = dm-i+1. The disk head scheduling algorithm used is First Come First Served (FCFS). R2 Memory[(Rl)] 1 ADD R2.d2d1 D) n = d1d2. Memory[6000] R2 2 Let the clock cycles required for various operations be as follows: Register to/from memory transfer : 3 clock cycles ADD with both operands in register : 1 clock cycle Instruction fetch and decode : 2 clock cycles per word The total number of clock cycles required to execute the program is Options A) 29 B) 24 C) 23 D) 20 Your Answer (Not Answered) Correct Answer B 9 Consider an operating system capable of loading and executing a single sequential user process at a time. R2 R2 + R3 ..dm (or) rev = dm. R2 and R3.. rev. claimed by the vendor to give 50% better benchmark results. } The loop invariant condition at the end of the ith iteration is: Options A) n = d1d2. rev = 0. while (n > 0) { rev = rev * 10 + n % 10 .. If FCFS is replaced by Shortest Seek Time First (SSTF).5000 .(R1) ... dm.d2d1 C) n rev Your Answer (Not Answered) Correct Answer A 8 Consider the following program segment for a hypothetical CPU having three user registers Rl. dm-i and rev = dmdm-1�. int n. a system call can block the entire process . Machine halts 1 1 MOV 6000. what is the expected improvement in the I/O performance of user programs ? Options A) 50% B) 40% C) 25% D) 0% Your Answer (Not Answered) Correct Answer D 10 Consider the following statements with respect to user-level threads and kernel-supported threads (i) Context switch is faster with kernel-supported threads (ii) For user-level threads. R2 .dm-1dm (or) rev = dm-i.R3 HALT .. n = n/10...

Of the following expressions I A[2] II A [2] [3] III B[l] IV B[2][3] which will not give compile-time errors if used as left hand sides of assignment statements in a C program ? Options A) I.(iii) Kernel-supported threads can be scheduled independently (iv) User-level threads are transparent to the kernel Which of the above statements are true? Options A) (ii). It is known that P1 is decidable and P2 is undecidable. courseno. 8 B) 120. 8 C) 960. III. (iii) and (iv) only Your Answer (Not Answered) Correct Answer B 13 Consider the following relation schema pertaining to a students database: Student (rollno. B [10][10]. address) Enroll (rollno. Which one of the following is TRUE? Options A) P3 is decidable if P1 is reducible to P3 B) P3 is undecidable if P3 is reducible to P2 C) P3 is undecidable if P2 is reducible to D) P3 is decidable if P3 is reducible to P2s P3 complement Your Answer (Not Answered) Correct Answer A 12 Which one of the following are essential features of an object-oriented programming language? (i) Abstraction and encapsulation (ii) Strictly-typedness (iii) Type-safe property coupled with sub-type rule (iv) Polymorphism in the presence of inheritance Options A) (i) and (ii) only B) (i) and (iv) only C) (i). II. and IV only D) IV only C) II and IV only Your Answer (Not Answered) Correct Answer D 15 How many distinct binary search trees can be created out of 4 distinct keys? Options . name. coursename) where the primary keys are shown underlined. P2 and P3. and IV only B) II. 8 D) 960. and (iii) only D) (i) and (ii) only Your Answer (Not Answered) Correct Answer A 11 Consider three decision problems P1. (ii) and (iv) only D) (i). where �*�denotes natural join? Options A) 8. The number of tuples in the Student and Enroll tables are 120 and 8 respectively. What are the maximum and minimum number of tuples that can be present in (Student * Enroll). (iii) and (iv) only B) (ii) and (iii) only C) (i). 120 Your Answer (Not Answered) Correct Answer C 14 Assume the following C variable declaration int *A [10].

1989. but not UDP B) TCP and UDP C) UDP. 9679. 50. 9. 29 C) 29. 60. 10. 60. 4199 hash to the same value (ii) 1471. 27. nor UDP Your Answer (Not Answered) Correct Answer B 18 The following numbers are inserted into an empty binary search tree in the given order: 10. 23. 25. 6171. 50. 1. but not TCP D) Neither TCP. 25. 27. 27. T produces the following sequence of keys 10. 40. 6173. 10. 9. 10. B) f should be onto but g need not be onto C) g should be onto but f need not be onto D) both f and g need not be onto Your Answer (Not Answered) Correct Answer B . What is the height of the binary search tree (the height is the maximum distance of a leaf node from the root)? Options A) 2 B) 3 C) 4 D) 6 Your Answer (Not Answered) Correct Answer B 19 Postorder traversal of a given binary search tree. 29. 23. Given that h is an onto function. 95. 22. 95. 10. Which one of the following is TRUE? Options A) f and g should both be onto functions. 25. 15. 29 Your Answer (Not Answered) Correct Answer A 20 Let f: B C and g: A B be two functions and let h = f o g. 15. 40. 50. 15. 22. 60. 40. 95 D) 95.A) 5 B) 14 C) 24 D) 42 Your Answer (Not Answered) Correct Answer B 16 Given the following input (4322. 22. 27. 23. 40. 4199) and the hash function x mod 10. 1334. 1989. 3. 23. 12. 40. 22. 60. 15. 60. 22. 25. 15. 16. 9. 15. 50. 5. 1471. 27. 29 Which one of the following sequences of keys can be the result of an inorder traversal of the tree T? Options A) 9. 6171 hash to the same value (iii) All elements hash to the same value (iv) Each element hashes to a different value Options A) (i) only B) (ii) only C) (i) and (ii) only D) (iii) or (iv) Your Answer (Not Answered) Correct Answer C 17 Packets of the same session may be routed through different paths in Options A) TCP. 25. 50. which of the following statements are true ? (i) 9679. 95 B) 9. 23.

- CS 2014 Solved
- CS-GATE-2010
- gate sample
- CS-GATE'14-Paper-03678678
- MC0078 SET 1 WINTER 2012 SOLVED
- s7csb Android2.2 Seminar Report
- How-To Install Android SDK on Windows, Mac and Linux
- 6322_android-dev-op
- Android (1)
- SAP UI5 Developer Guide for SAP HANA En
- Manual HP Server Proliant DL 180
- TS-4222
- Galaxy Ace Plus
- JMS Configuring
- EpocOS
- Performance Tuning Settings
- Oracle Background Processes By Vinit
- Android.pptx
- Windows 2000 Tips
- IEEE 2014 JAVA NETWORKING PROJECT Congestion Aware Routing in Nonlinear Elastic Optical Networks
- Untitleddocument (1)
- Soap Xmlrpc
- SugarSync Quick Start Guide
- Untitled
- EP Hardware Manual
- new2
- Types of Computer
- Secondlife Video Streams

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue listening from where you left off, or restart the preview.

scribd