# Institute Of Engineering Studies (IES Bangalore

)
Questions 1 to 25 carry one mark each

CSE MOCK TEST-I

1. If A = (a) -2 2. The function (a) maximum at minimum (b) – 1 has

then det (

)= (c) 1 (d) 2

(b) minimum at

(c) no maximum

(d) no

3. The order of truncation error in Runge-Kutta fourth order method is (a) O ( ) (b) O ( ) (c) O ( ) (d) O ( ) 4. If the events S and T have equal probabilities and are independent with P (S ∩ T) = P > 0 then P(S) = (a) (b) (c) (d) P 5. Which of the following state is not true ? (a) DFA is equivalent in power to regular expression (b) The PDA is equivalent in power to CFL (c) The DFA and NFA are equivalent in power (d) The DPPA and NPDA are equivalent in power 6. Which of the following is true ? (a) Though there are no RR conflicts in LR(1) but may be there in LALR (1). (b) Though there are no SR conflicts in LR(1) but may be there in LALR (1). (c) Though there are no SR conflicts in LALR(1) but may be there in SLR (1). (d) none. 7. Consider the grammar : S→xAy |xBy| xAz A → qS |q B→q In the goto graph of LR(0) items , we find (a) SR conflicts (b) RR conflicts

(c) both

(d) none

8. The stack „S‟ is stored in an array indexed as [ 1 … N] and TOP pointer is initially at zero position . Peep( ) is a (non standard ) stack routine which is used to desire i th element with respect to TOP pointer. Identify the correct statement to return the element : (a) S[TOP-1 -1] (b) S[TOP -1] (c) S[TOP -1 +1] (d) S[TOP +1 -1] 9. A binary search tree has been traversed to search for 88 . Identify which of the statements are correct : S1 : 58, 90, 60, 75, 78, 80, 85, 88 S2 : 58, 90, 95, 42, 75, 36, 85, 88 S3 : 12, 35, 54, 58, 90, 60, 89, 88

1

No.1 Training center for GATE/IES/JTO/PSUs in Bangalore @ Malleshwaram & Jayanagar, Bangalore: Ph: 0 99003 99699/ 0 97419 00225 / 080-32552008 Email : Onlineies.com@gmail.com Site: www.onlineIES.com Google+: http://bit.ly/gplus_iesgate FB: www.facebook.com/onlineies

Institute Of Engineering Studies (IES Bangalore)

CSE MOCK TEST-I

(a) S1 only 10. (a) + +w

S4 : 12, 35, 78, 58, 31, 42, 36, 88 (b) S2, S4 y + wx = …………. (b) + x

(c) S1, S4

(d) S1, S3

(c)

+w+

(d) x + w y

11. Which of the following 2‟s complement signed number is divisible by -3 & -5 ? (a) 1111 1111 1011 (b) 1111 1110 0010 (c) 1111 1111 0111 (d) 1111 1110 0001 12. The following assembly language program is stored in byte addressable memory from decimal address 800 onwards . MOV , (100) 4 MOV , (100) 4 ADD , 2 MOV (100) , 4 If each word consume 64 bits what will be the decimal address saved on to stack on the occurrence of interrupt during ADD instruction (a) 850 (b) 880 (c) 911 (d) 912 13. The disk drive of 20 GB contains n plotters and 640 cylinders . There are 512 sectors per tracks and 1024 bytes per sectors . What will be the number of recording surfaces and the size of physical address (in bits) (a) 8, 35 (b) 16, 24 (c) 32, 24 (d) 32, 35 14. Which of the following page replacement method guarantees the minimum number of page faults ? (a) Replace the page whose next reference will be the farthest in future . (b) Replace the page whose next reference will be the nearest in future . (c) Replace the page whose most reference was the nearest in past . (d) Replace the page whose most recent reference was the farthest in past. 15. Which of the following is / are true with respect to paging ? I. It divides physical memory into equal size units . II. It allows implementation of virtual memory III. It suffers from external fragmentation . (a) I & III (b) I only (c) II only (d) I & II 16. The language that support ………… Data type binding is ………. Efficient than those that support …… … Data type binding . (a) Static , less, Dynamic (b) Dynamic , less, static (c) Static , max, Dynamic (d) Dynamic , more , static 17. Let A & B be languages corresponding to two decision problems & respectively . Let A be NP – complete problem. B is not known to be in NP. Which of the following is false ? (a) A is NP – Hard (b) B may be NP –Hard (c) If A B then B is NP-complete (d) A is in NP 18. Which of the following list of elements in the array satisfies max-heap property ?
No.1 Training center for GATE/IES/JTO/PSUs in Bangalore @ Malleshwaram & Jayanagar, Bangalore: Ph: 0 99003 99699/ 0 97419 00225 / 080-32552008 Email : Onlineies.com@gmail.com Site: www.onlineIES.com Google+: http://bit.ly/gplus_iesgate FB: www.facebook.com/onlineies

2

Institute Of Engineering Studies (IES Bangalore)
(a) 16, 10, 12, 8, 3, 5 (c) 16, 12, 8, 3, 5, 10 (b) 16, 8, 5, 10, 12, 3 (d) 10, 16, 12, 8, 5, 3

CSE MOCK TEST-I

19. Given that the block size is 512 bytes, search field is 9 bytes, record pointer is 7 bytes and a block pointer is 6 bytes long, what are the orders of internal and least nodes of - tree respectively ? (a) 31, 34 (b) 34, 31 (c)32, 33 (d) 34, 32 20. Consider the following schedule S using transactions , and :

(A) ; (A); r (A); (B); r (A); (B); (B); (A); (A) ; (B) ; (B); (B);

Which of the following must be TRUE ? (a) S is conflict serializable as → → (b) S is conflict serializable as → → (c) S is conflict serializable as → → (d) S is conflict serializable as → →

. . . .

21. Consider source and destination in a 10 Mbps network with senders window 5 packets. Transmission delay for a packet is 10 μ sec, propagation delay from source to destination is 250 μ sec. How long sender is ideal once a window is transmitted before being starting second window ? Assume ACK transmission time is negligible . (a) 250 μ sec (b) 400 μ sec (c) 450 μ sec (d) 150 μ sec 22. Subnet number 172. 156. 170.0 172.156.168.0

Interface IF0 IF1

3

No.1 Training center for GATE/IES/JTO/PSUs in Bangalore @ Malleshwaram & Jayanagar, Bangalore: Ph: 0 99003 99699/ 0 97419 00225 / 080-32552008 Email : Onlineies.com@gmail.com Site: www.onlineIES.com Google+: http://bit.ly/gplus_iesgate FB: www.facebook.com/onlineies

Institute Of Engineering Studies (IES Bangalore)
172.156.166.0 172.156.164.0 0.0.0.0 255.255.254.0 255.255.252.0 0.0.0.0 R1 IF2 R2

CSE MOCK TEST-I

Suppose a router has built up the routing table above. Router can deliver packets directly over interfaces 0 and 1 or it can forward packets to router R2. Assume router does the longest prefix match. What the router does with a packet addressed to 172.156.167.92 ? (a) IF 1 (b) IF 2 (c) R1 (d) R2 23. Which one of the following HTTP methods is not necessarily idempotent ? (a) POST (b) GET (c) HEAD (d) TRACE 24. An individual module has a reliability of 0.999 & 225 such modules are put in series . The reliability of the whole software is (a) 0.896 (b) 0.798 (c) 0.692 (d) 0.999 25. In ASP.NET , form contents will remain filled even if the page is refreshed , it is done using _viewstate . _viewstate is possible using (a) URL Rewriting (b) Cookies (c) Hidden Fields (d) None Questions 26 to 55 carry two marks each 26. Consider the following statement formulae : : If x does not occur free in C then ∃x[A(x)→C] ⟺ [∀x A(x) →C] : {∀x [C(x) → P(x)] ∧ ∃x [C(x) ∧ L(x)]} ⇒ ∃x[P(x) ∧ L(x)] Which of the following is true ? (a) is true and is false (b) is false and is true (c) both and are true (d) both and are false 27. Let A = {0, 1, 2} ; P(A) is set of all subsets of „A‟ and P(A) with respect to ⊆ is a poset, then which of the following is false ? (a) [P(A) ; ⊆] is a totally ordered set (b) [P(A) ; ⊆] is a bounded lattice (c) [P(A) ; ⊆] is a distributive lattice (d) [P(A) ; ⊆] is a complemented lattice. 28. There are 100 people in a room. In this group 60 are men, 30 are young and 10 are young men, then the number of old women is (a) 10 (b) 20 (c) 30 (d) 40 29. If L is any language and in its complement then which of the following is true (a) Both L and are recursive enumerable (b) Both L and can be non-recursively enumerable (c) Both L and can be CSL (d) None of the above 30. Which of the following is a regular languages ? (a) { / n ≥ 0} (b) { / m ≥ 3, n ≥4} (c) { /n>0} (d) { / n > 0}

4

No.1 Training center for GATE/IES/JTO/PSUs in Bangalore @ Malleshwaram & Jayanagar, Bangalore: Ph: 0 99003 99699/ 0 97419 00225 / 080-32552008 Email : Onlineies.com@gmail.com Site: www.onlineIES.com Google+: http://bit.ly/gplus_iesgate FB: www.facebook.com/onlineies

Institute Of Engineering Studies (IES Bangalore)
31. Consider the following for loop : for (int i = 0 ; i < n ; i += 2) { A[i] = B[i] + C[i] ; } Suppose we generated the following unoptimized 3AC (three-address code) for the loop : i :=0 ; loop : if (i >=n) goto after ; t1 := i * 4 ; t2 := b[t1] ; t3 := i * 4 ; t4 := c[t3] ; t5 := t2 + t4 ; t6 := i * 4 ; a[t6] := t5 ; i := i + 2 ; goto loop; after : Which optimizations can be applied on this code ? (a) Code motion (b) Loop unrolling (d) Common Subexpression elimination

CSE MOCK TEST-I

(c) Loop jamming

32. Find the FIRST and FOLLOW sets for each of the non-terminals in the following grammar (note that some productions below have epsilon as the right-hand side) : A→BC m | C B→DB |ε C→k|ε D→p|r Find follow of (D) . (a) {p, r, \$} (b) {p, r, m}

(c) {p, m}

(d) {p, r, k, m}

33. Consider the following algorithm on an array : Algorithm Do(A, n) Input : An integer array A and an integer n Output: find out if (n = = 1) then return A[0] else return Do(A, n-1) + A[n-1] end. What does the algorithm return for the input array A = {4, 3, 6, 2, 5} and the invocation is Do(A,5) (a) sum of array elements (b) maximum of array elements (c) minimum of array elements (d) reversing the array elements 34. Consider the following state table the state variables P, Q input B x output B, Y. Initial values P =0, Q = 1. What is the smallest input sequence taken the machine to state 11 and output 1

5

No.1 Training center for GATE/IES/JTO/PSUs in Bangalore @ Malleshwaram & Jayanagar, Bangalore: Ph: 0 99003 99699/ 0 97419 00225 / 080-32552008 Email : Onlineies.com@gmail.com Site: www.onlineIES.com Google+: http://bit.ly/gplus_iesgate FB: www.facebook.com/onlineies

Institute Of Engineering Studies (IES Bangalore)

CSE MOCK TEST-I

P Q X 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 0 1 1, 1, 0, 1, 1, 1, 1, 0,

,Z 0 0 0 0 1 0 0 1

(a) 0 1

(b) 1 0 1

(c) 1 1 0

(d) 0 0 1 0

35. Consider the following specifications : Hit ratio for read = 0.8 Hit ratio for write = 0.9 Block size = 2 words Cache of 10ns is 10 times faster than main memory On any miss entire block is to be moved from main memory to cache memory. 20% references are for write operations. What is the average access time with write through and write allocate ? (a) 50 ns (b) 55 ns (c) 64 ns (d) 80 ns 36. A computer has 32-bit virtual address space and 1024 Byte page. Page table entries are 4 Bytes. A multi-Level page table is used inorder to ensure that each level page table is storable in one page. How many levels of paging are required ? (a) 1 level (b) 2 levels (c) 3 levels (d) 4 levels 37. Consider the following snapshot of a system

Allocation ABCD 0012 1000 1354 0632 0014

Max ABCD 0012 1750 2356 0652 0656

Available ABCD 1520

Which of the given claims is/are correct ? I. The system is safe and the safe sequence is <

,

,

,

,

>

6

No.1 Training center for GATE/IES/JTO/PSUs in Bangalore @ Malleshwaram & Jayanagar, Bangalore: Ph: 0 99003 99699/ 0 97419 00225 / 080-32552008 Email : Onlineies.com@gmail.com Site: www.onlineIES.com Google+: http://bit.ly/gplus_iesgate FB: www.facebook.com/onlineies

Institute Of Engineering Studies (IES Bangalore)
II. The system is unsafe . III. The request issued by process IV. The system is Deadlocked. V. The system is Deadlock free . (a) I, II & III (b) I & II

CSE MOCK TEST-I

< 0, 4, 2, 0 > can be granted

(c) III, IV & V

(d) I, III & V

38. Consider the program given below : void main ( ) { int a = 4; int *p = &a; int *q = &a; int = ++(*p) int * r = p; r = - - * (p) +4; + + * r; Printf(“%d %d %d” , a, b, *r) } What are the final values of m , n, r ? (a) 8, 8, 8 (b) 8, 5, 7 (b) 5, 5, 5

(d) 8, 5, 8

39. Consider the pseudo-code given below : x : integer ; procedure set-x(n : integer) x = n; procedure print-x write-integer (x); procedure Test (s, p : function ; n : integer) x : integer; if (n in {1, 3}) set-x (n); else s(n); if (n in {1, 2}) print-x else p; set-x(n+2), print-x; What will be the output of the program for the call ? set-x (0); Test (set-x, print-x, 4); Print-x; (a) 4, 6 (b) 6, 4 (c) 4, 4 (d) 0, 4 40. Consider the following claims :

7

No.1 Training center for GATE/IES/JTO/PSUs in Bangalore @ Malleshwaram & Jayanagar, Bangalore: Ph: 0 99003 99699/ 0 97419 00225 / 080-32552008 Email : Onlineies.com@gmail.com Site: www.onlineIES.com Google+: http://bit.ly/gplus_iesgate FB: www.facebook.com/onlineies

Institute Of Engineering Studies (IES Bangalore)
I. n is O( ) x > 0; y > 0 II. 4 is O ( ) III. 4. is Ω ( ) IV. 10n logn is O(nlogn) Which of the above are true ? (a) I & II (b) I, II & III

CSE MOCK TEST-I

(c) I, II & IV

(d) I, II, III & IV

41. Let S = {a, b, c, d, e, f, g} be a collection of objects with benefit-weight values as : {a: (12,4), b: (10,6), c: (8,5), d: (11,7), e: (14,3), f: (7,1), g: (9,6)} What is an optimal solution to the fractional Knapsack problem for S assuming the Knapsack can hold objects with total weight of 18? (a) 49.4 (b) 50.2 (c) 51 (d) none 42. Which of the following inequality best characterizes the number n of keys that can exist in a B-tree of order k with height h? (Assume that a B-tree of height 1 is a B-tree having only one node) (a) { 2 * - 1} <= n <= { - 1} (b) { 2 * } <= n <= { } (c) { 2 * - 1} <= n <= { - 1} (d) { 2 * - 1} <= n <= { } 43. Consider the following sequence of actions : r1(A); r2(B); w1(C); w3(B); r3(C); w2(B); w3(A); Assume that the read-and write –timestamps of A, B, and C are each 0 prior to execution of these actions. For which initial timestamps of the transactions T1, T2, and T3 will no transaction abort, using timestamping protocol with Thomas write rule ? (a) T S(T1) = 100; T S(T2) = 300; T S(T3) = 200 (b) T S(T1) = 200; T S(T2) = 100; T S(T3) = 300 (c) T S(T1) = 100; T S(T2) = 200; T S(T3) = 300 (d) Both (b) and (c) 44. A token ring LAN with 25 Mbps interconnects M stations using a star topology in the following way. All the input and output lines of the token ring station interfaces are connected to a cabinet where actual ring is placed. Suppose that the distance from each station to the cabinet is 100 meters and the ring latency per station is 8 bits. Assume that packets are 1250 bytes . How many hosts we suppose to connect to have minimum size of the token ring ? (a) 100 (b) 300 (c) 150 (d) 200 45. Which statement is true ? 1. XML DOCUMENT cannot use xml as tag name. 2. All XML elements must have a closing tag 3. All XML elements must be lower case 4. All XML documents must have a DTD (a) 1 & 2 (b) 1, 2 & 4 (c) 1, 2 & 3

(d) All

46. RSA public key cryptography is used and p = 11 and q = 29 and public key pair (e, n) is given as (3, 319) . Find the secret key, d = ? (a) 16 (b) 17 (c) 187 (d) 281 47. For a source code the following values are provide for N1 = 60, N2 = 50, n1 = 30, n2 = 20, n1* = 10, n2* = 12. Calculate Intelligence Content with the above values (a) 14.70 (b) 15.25 (c) 16.58 (d) 18.25

8

No.1 Training center for GATE/IES/JTO/PSUs in Bangalore @ Malleshwaram & Jayanagar, Bangalore: Ph: 0 99003 99699/ 0 97419 00225 / 080-32552008 Email : Onlineies.com@gmail.com Site: www.onlineIES.com Google+: http://bit.ly/gplus_iesgate FB: www.facebook.com/onlineies

Institute Of Engineering Studies (IES Bangalore)

CSE MOCK TEST-I

Common Data for Questions 48 and 49 : Suppose that a hash table contains hash size = 11 entries indexed from 0 to 10 and the following keys are to be mapped into the table : 12, 44, 13, 88, 23, 94, 11, 39, 20, 16, 5 Hash function h(i) = (2i + 5) mod 11. 48. Calculate the number of collisions (a) 2 (b) 3 (c) 4

(d) 5

49. If the above keys are handled by Chaining , then how many are empty bucket slots (a) 3 (b) 4 (c) 5 (d) 6 Common data for Questions 50 and 51: Consider the following instance of the Optimal Binary Search Tree Problem being solved by Dynamic programming technique : n = 4; ( , , , ) = (do, if, read, while) P(1:4) = (3, 3, 1, 1) Q(0:4) = (2, 3, 1, 1, 1) 50. What is the cost of the O.B.S.T ? (a) 34 (b) 32 (c) 30 (d) 40 51. The root of the tree is (a) do (b) if

Statement for Linked Answer Questions 52 and 53 : Consider the following IP/Subnet mask. IP : 10. 1. 0. 100 Mask: 255.255.254.0 52. What are the network number , subnet number and number of bits borrowed from host ID ? (a) 10, 1.0.0 , 14 (b) 10, 1.0.0 , 8 (c) 10, 1.0.0, 100 (d) 10, 1.0.0 , 15 53. Based on number of bits borrowed from above question, find number of subnets and hosts per subnet possible in network 10.0.0.0 (a) 16384, 510 (b) 256, 65534 (c) 32768, 510 (d) 510, 32768 Statement for Linked Answer Questions 54 and 55 : A tree has „2n‟ vertices of degree 1. „3n‟ vertices of degree 2 and „n‟ vertices of degree 3. 54. Then the number of vertices in the tree is (a) 8 (b) 10 (c) 12 55. Then the number of edges in the tree is (a) 7 (b) 9 (c) 11

(d) 14

(d) 13

GENERAL APTITUDE Q.Nos 56 to 60 will carry one mark each 56.A train running at a uniform speed crosses two women coming in the opposite direction at 2.4 kmph and 6 kmph in 45 seconds and 36 seconds respectively . Find the speed of the train ?

9

No.1 Training center for GATE/IES/JTO/PSUs in Bangalore @ Malleshwaram & Jayanagar, Bangalore: Ph: 0 99003 99699/ 0 97419 00225 / 080-32552008 Email : Onlineies.com@gmail.com Site: www.onlineIES.com Google+: http://bit.ly/gplus_iesgate FB: www.facebook.com/onlineies

Institute Of Engineering Studies (IES Bangalore)
a.10.8 kmph b. 12 kmph c. 13.2 kmph d. 14.4 kmph

CSE MOCK TEST-I

57.A, B and C start a business . A invests 2 times as much as B invests . A and B invests 3 times of what C invests. Then the ratio of capital of A,B and C is ? a.1:3:6 b. 6:3:1 c. 1:2:3 d. 3:2;1 58.A container contains 1000 litres of milk. From this container 100 litres of milk was taken out and replaced by water . If this process was repeated another three times , how much milk is now contained by the container ? a.729 lts b. 700 lts c. 656.1 lts d. 343.9 lts 59.Identify the pair of words , which has a relationship similar to the pair in question Romantic : Realistic a.Dramatic : Prosaic b. Fanciful : actual c. Thought : idea d. Poet : Dramatist 60.This question has a set of four words . Choose the word that does not belong to the group a. Cartridge b. Barrel c. Gun d. Drum Q.Nos 61 to 65 will carry two marks each 61.In the following sentence , some part of the sentence is underlined . Beneath each sentence you will find four ways of phrasing the underlined part. Choose the best choice that follows the requirements of standard written English In the split brain preparation , we have managed to dissociate various parts of the brain from one another a.to associate various parts of the brain from one another b. to dissociate various parts of the brain from one another c. to dissociate various parts of the brain from each another d. to dissociate various parts of the brain among each other 62.A program instituted in a particular state allows parents to prepay their children‟s future college tuition at current rates .The program then pays the tuition annually for the child at any of the states public colleges in which the child enrolls . Parents should participate in the program as a means of decreasing the cost of their children‟s college education. Which of the following , if true , is the most appropriate reason for parents not to participate in the program ? a.The parents are unsure about which public college in the state the child will attend b. The amount of money accumulated , by putting the prepayment funds in an interest-bearing account today will be greater than the total cost of tuition for any of the public colleges when the child enrolls c. The annual cost of tuition at the states public colleges is expected to increase at a faster rate than the annual increase in the cost of living d. Some of the state‟s public colleges are contemplating large increase in tuition next year. 63.This question consists of six statements followed by options consisting of three statements put together in a specific order . Choose the option which indicates a valid argument , that is , where the third statement is a conclusion drawn from the preceding two (A) Navratilova won the tournament (B) Only talented people can win a tournament (C) Graf is not talented (D) Navratilova is not talented (E) Graf lost the tournament (F) Navratilova is more talented than graf a. BAD b. BCE c. DAF d. EAC

10

No.1 Training center for GATE/IES/JTO/PSUs in Bangalore @ Malleshwaram & Jayanagar, Bangalore: Ph: 0 99003 99699/ 0 97419 00225 / 080-32552008 Email : Onlineies.com@gmail.com Site: www.onlineIES.com Google+: http://bit.ly/gplus_iesgate FB: www.facebook.com/onlineies

Institute Of Engineering Studies (IES Bangalore)

CSE MOCK TEST-I

64.Rajesh started walking along the boundaries square field from corner point A. After half an hour, he reached the corner point „C‟ diagonally opposite to A. If this speed was 8 kmph what is the area of the field in square kilometer ? a. 16 b. 4 c. 8 d. none 65.If the price of petrol is increased by 20 % and subsequently by 40 %, what is the final price if the original price is Rs. 25 ? a. 42 Rs b. 21 Rs c. 63 Rs d. 84 Rs

11

No.1 Training center for GATE/IES/JTO/PSUs in Bangalore @ Malleshwaram & Jayanagar, Bangalore: Ph: 0 99003 99699/ 0 97419 00225 / 080-32552008 Email : Onlineies.com@gmail.com Site: www.onlineIES.com Google+: http://bit.ly/gplus_iesgate FB: www.facebook.com/onlineies

Institute Of Engineering Studies (IES Bangalore) CSE MOCK TEST-I (key) 1.d 2.a 3.c 4.d 14.a 15.d 16.a 17.c 27.a 28.b 29.b 30.b 40.a 41.a 42.a 43.d 53.c 54.c 55.c 56.b

CSE MOCK TEST-I

5.d 18.a 31.d 44.b 57.b

6.a 19.b 32.d 45.a 58.c

7.b 20.c 33.a 46.c 59.a

8.c 21.b 34.c 47.c 60.d

9.d 22.c 35.c 48.c 61.b

10.a 23.a 36.c 49.c 62.b

11.b 24.b 37.d 50.b 63.b

12.b 25.c 38.d 51.b 64.c

13.c 26.c 39.a 52. 65.a

12

No.1 Training center for GATE/IES/JTO/PSUs in Bangalore @ Malleshwaram & Jayanagar, Bangalore: Ph: 0 99003 99699/ 0 97419 00225 / 080-32552008 Email : Onlineies.com@gmail.com Site: www.onlineIES.com Google+: http://bit.ly/gplus_iesgate FB: www.facebook.com/onlineies