mock gate -i(cse)

Upload: institute-of-engineering-studies-ies

Post on 06-Apr-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Mock GATE -I(CSE)

    1/12

    Institute Of Engineering Studies (IES Bangalore) CSE MOCK TEST-I

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

    Questions 1 to 25 carry one mark each

    1. If A =

    then det () =(a) -2 (b)1 (c) 1 (d) 2

    2. The function has(a) maximum at

    (b) minimum at (c) no maximum (d) nominimum

    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 x A y | x B y | x A zA qS |qB 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 TOPpointer. 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

  • 8/3/2019 Mock GATE -I(CSE)

    2/12

    Institute Of Engineering Studies (IES Bangalore) CSE MOCK TEST-I

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

    S4 : 12, 35, 78, 58, 31, 42, 36, 88(a) S1 only (b) S2, S4 (c) S1, S4 (d) S1, S3

    10. + y + wx= .(a)

    + w

    (b)

    +

    x

    (c)

    + w +

    (d) x + w

    y

    11. Which of the following 2s 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 decimaladdress 800 onwards .

    MOV , (100) 4MOV , (100) 4ADD , 2MOV (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 and1024 bytes per sectors . What will be the number of recording surfaces and the size of physical address (inbits)(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 memoryIII. 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 NPcomplete problem. B is not known to be in NP. Which of the following is false ?(a) A is NPHard (b) B may be NPHard

    (c) If A B then B is NP-complete (d) A is in NP18. Which of the following list of elements in the array satisfies max-heap property ?

  • 8/3/2019 Mock GATE -I(CSE)

    3/12

    Institute Of Engineering Studies (IES Bangalore) CSE MOCK TEST-I

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

    (a) 16, 10, 12, 8, 3, 5 (b) 16, 8, 5, 10, 12, 3(c) 16, 12, 8, 3, 5, 10 (d) 10, 16, 12, 8, 5, 3

    19. Given that the block size is 512 bytes, search field is 9 bytes, record pointer is 7 bytes and a blockpointer 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 :

    r(A);

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

    r

    (A);

    (A);

    (B);(B);

    (A) ;(A);(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. Transmissiondelay for a packet is 10 sec, propagation delay from source to destination is 250 sec. How long senderis ideal once a window is transmitted before being starting second window ? Assume ACK transmissiontime is negligible .

    (a) 250 sec (b) 400 sec (c) 450 sec (d) 150 sec

    22.

    Subnet number Subnet mask Interface172. 156. 170.0 255.255.254.0 IF0

    172.156.168.0 255.255.254.0 IF1

  • 8/3/2019 Mock GATE -I(CSE)

    4/12

    Institute Of Engineering Studies (IES Bangalore) CSE MOCK TEST-I

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

    172.156.166.0 255.255.254.0 R1

    172.156.164.0 255.255.252.0 IF2

    0.0.0.0 0.0.0.0 R2

    Suppose a router has built up the routing table above. Router can deliver packets directly over interfaces0 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 reliabilityof 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, thenthe 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}

  • 8/3/2019 Mock GATE -I(CSE)

    5/12

    Institute Of Engineering Studies (IES Bangalore) CSE MOCK TEST-I

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

    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 unoptimized3AC (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 (c) Loop jamming(d) Common Subexpression elimination

    32. Find the FIRST and FOLLOW sets for each of the non-terminals in the following grammar (note thatsome productions below have epsilon as the right-hand side) :

    A B C m | CB D B | 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 nOutput: find out

    if (n = = 1) thenreturn A[0]

    elsereturn 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 isDo(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

  • 8/3/2019 Mock GATE -I(CSE)

    6/12

    Institute Of Engineering Studies (IES Bangalore) CSE MOCK TEST-I

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

    P Q X ,Z0 0 00 0 10 1 0

    0 1 11 0 01 0 11 1 01 1 1

    0 1 , 01 1, 00 0, 0

    1 1 , 01 1, 10 1 , 00 1, 01 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.8Hit ratio for write = 0.9

    Block size = 2 wordsCache of 10ns is 10 times faster than main memoryOn 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. Amulti-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 Max Available

    ABCD ABCD ABCD

    0012 0012 1520 1000 1750

    1354 2356

    0632 0652 0014 0656Which of the given claims is/are correct ?I. The system is safe and the safe sequence is < , , , , >

  • 8/3/2019 Mock GATE -I(CSE)

    7/12

    Institute Of Engineering Studies (IES Bangalore) CSE MOCK TEST-I

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

    II. The system is unsafe .III. The request issued by process < 0, 4, 2, 0 > can be grantedIV. The system is Deadlocked.V. The system is Deadlock free .(a) I, II & III (b) I & II (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-xelse 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 :

  • 8/3/2019 Mock GATE -I(CSE)

    8/12

    Institute Of Engineering Studies (IES Bangalore) CSE MOCK TEST-I

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

    I. n is O() x > 0; y > 0II. 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 (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 holdobjects 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 oforder k with height h? (Assume that a B-tree of height 1 is a B-tree having only one node)

    (a) { 2 * - 1}

  • 8/3/2019 Mock GATE -I(CSE)

    9/12

    Institute Of Engineering Studies (IES Bangalore) CSE MOCK TEST-I

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

    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 Dynamicprogramming 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 (c) read (d) while

    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 subnetpossible 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 (d) 14

    55. Then the number of edges in the tree is(a) 7 (b) 9 (c) 11 (d) 13

    GENERAL APTITUDE

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

  • 8/3/2019 Mock GATE -I(CSE)

    10/12

    Institute Of Engineering Studies (IES Bangalore) CSE MOCK TEST-I

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

    a.10.8 kmph b. 12 kmph c. 13.2 kmph d. 14.4 kmph

    57.A, B and C start a business . A invests 2 times as much as B invests . A and B invests 3 times of whatC 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 andreplaced by water . If this process was repeated another three times , how much milk is now contained bythe 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 questionRomantic : Realistic

    a.Dramatic : Prosaic b. Fanciful : actual c. Thought : idea d. Poet : Dramatist60.This question has a set of four words . Choose the word that does not belong to the groupa. 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 willfind four ways of phrasing the underlined part. Choose the best choice that follows the requirements ofstandard written EnglishIn the split brain preparation , we have managed to dissociate various parts of the brain from one anothera.to associate various parts of the brain from one anotherb. to dissociate various parts of the brain from one anotherc. to dissociate various parts of the brain from each anotherd. to dissociate various parts of the brain among each other

    62.A program instituted in a particular state allows parents to prepay their childrens future collegetuition at current rates .The program then pays the tuition annually for the child at any of the states publiccolleges in which the child enrolls . Parents should participate in the program as a means of decreasing

    the cost of their childrens college education.Which of the following , if true , is the most appropriate reason for parents not to participate in theprogram ?a.The parents are unsure about which public college in the state the child will attendb. The amount of money accumulated , by putting the prepayment funds in an interest-bearing accounttoday will be greater than the total cost of tuition for any of the public colleges when the child enrollsc. The annual cost of tuition at the states public colleges is expected to increase at a faster rate than theannual increase in the cost of livingd. Some of the states 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 togetherin 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 nottalented (D) Navratilova is not talented (E) Graf lost the tournament (F) Navratilova is moretalented than grafa. BAD b. BCE c. DAF d. EAC

  • 8/3/2019 Mock GATE -I(CSE)

    11/12

    Institute Of Engineering Studies (IES Bangalore) CSE MOCK TEST-I

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

    64.Rajesh started walking along the boundaries square field from corner point A. After half an hour, hereached the corner point C diagonally opposite to A. If this speed was 8 kmph what is the area of thefield 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

  • 8/3/2019 Mock GATE -I(CSE)

    12/12

    Institute Of Engineering Studies (IES Bangalore) CSE MOCK TEST-I

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

    CSE MOCK TEST-I (key)

    1.d 2.a 3.c 4.d 5.d 6.a 7.b 8.c 9.d 10.a 11.b 12.b 13.c14.a 15.d 16.a 17.c 18.a 19.b 20.c 21.b 22.c 23.a 24.b 25.c 26.c27.a 28.b 29.b 30.b 31.d 32.d 33.a 34.c 35.c 36.c 37.d 38.d 39.a40.a 41.a 42.a 43.d 44.b 45.a 46.c 47.c 48.c 49.c 50.b 51.b 52.

    53.c 54.c 55.c 56.b 57.b 58.c 59.a 60.d 61.b 62.b 63.b 64.c 65.a