apt qn 28-01-13

Upload: sivatutyindia

Post on 04-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 apt qn 28-01-13

    1/4

    1. Find the probability of getting a number with 7 between 100 and 999 (both inclusive).

    2. There are 10 items in a box, out of which 3 are defective.2 balls are taken one after the other.What is the probability that both of them are defective?

    3. Context free grammar is accepted bya) finite automatab) push down automatac) two way bounded automatad) both b and c

    4. Which is not a memory management scheme?

    a) buddy systemb) swappingc) monitorsd) paging

    5. Simplify the Karnaugh map given below and derive its expression in SOP form- 1 1 -1 - - 11 - - 1- 1 1 -

    7. Definition of Context Sensitive Grammar

    8. An identifier can start with a letter followed by any number of letter or digits . (true / false)

    9. With the following configuration:

    8MB total memory, 256kb cache, 4kb is block size.Using direct mapping, how many different physical memory blocks can be mapped on to the cache.

    (a) 64 (b) 256 (c) 128

    10. CSMA/CD is used ina) token ringb) FDDI

    c) ethernet

    11. In TCP/IP header, checksum containsa) sum of all the wordsb) ones complement of the data

    c) ones complement of the sum of all the wordsd) ones complement of the sum in ones complement

    12. What is the maximum number of acknowledgements for a 4 bit sequence number in a sliding window protocol.13. Which is a good way of representing varaibles in recursiona) local variablesb) static varaiblesc) global variables

    14. Given the following c program

    func(){static int i = 10;printf("%d",i);i++;}

    What is the value of i if the function is called twice ?

    15. Given the following c programfunc(int *i, int*j){*i=*i * *i;*j=*j* *j;

    }main(){ int i = 5, j = 2;

    func(&i,&j);printf("%d %d", i, j);}

    What is the output?

    16. Given page table, page size and offset how to find the corresponding physical address ?

    17. In a memory chip 4k size and 16bit words are to be stored. No of address and data lines required is:

    18. Identify in which pass of the 2 pass compiler are the following compiled1) literals2) address resolution3) listing

  • 7/29/2019 apt qn 28-01-13

    2/4

    19. Object code does not requirea) relocation bitsb) external names and place where they are locatedc) absolute adressd) all the object codes

    20. ARP is in reference to

    a) MAC to IPb) IP to MAC

    21. Question on Balanced tree -A balanced tree is given and a node is addded at the leaf.

    Find the no of unbalanced nodes?22. What is the order of Hashing time:a) 0(1)b) 0(n2)

    23. Given that:s -> s + s ; s -> s * s ; s -> a

    Find the no of parse trees for a+a*a+aa) 4b) 5c) 6d) 7

    24. Order of deleting a node from a linked list. (pointer is to an arbitrary node)a)0(1)b)0(n)

    25. A choclate of size nXn is given and is to be made into pices of size 1x1. At a time both horizontal and a verticalcut is done. Find the order of complexitya) O(n2)b) O(nlogn)c) O(logn)

    27) No of leaf nodes given. find the no of nodes with degree 2.

    28) AX = B.A is mXn and B is mX1

    a) there is a unique solution if rank of A is same as rank of augumented matrix [A b]

    b) there are multiple solutions

    30. A and B are sets.

    A's cardinality is m and B's is n where m < nHow many one to one mappings can be obtained.

    a) n ^ mb) npmc) mpnd) mcn

    31. In scheduling algorithnms which are logically executed but suspendeda) preemptiveb) SJFc)non preemptived) all the above32. I/O redirection isa) copying programs files through a pipe

    b) input files are createdc) input file taken from existing onesd) none

    33. Symmetric multiprocessing can be done ina) snoopy protocolsb) cache coherence

    34. In the dining philosophers problems to avoid dead locka) 1 person will take left one and all other will take right oneb) adjacent persons should not eat concurrently

    35. In the process state cycle, which is the correct ordera) timeout: ready -> runningb) blocked: ready -> running36. For converting infix expression to postfix what do we require

    a) operand stackb) operator stack

    37. 0 is reprented as both and negative and positive ina) ones complement

    b) twos complementc) two's complement has extra negative number

  • 7/29/2019 apt qn 28-01-13

    3/4

    38. What is the difference between c and c++?a) In c++ we can define variables in the middleb) dynamic scoping

    39. Which of the following is correcta) Synchronous tranmission needs more badwidth than Asychronous.b) Inasychronous transmission, the time is associated with data itself.....

    Paper #2

    1. There was a circuit given using three nand gates with two inputs and one output. Find the output.

    a) ORb) ANDc) XORd) NOT

    2. Suggest a sorting algorithm which is efficient (in worst case) to 10 valuesa) Binary treeb) Selectionc) Bubbled) Any of the above

    3. What is the number of comparisons in the worst case to merge two sorted lists containing n elements each.a) 2nb) 2n-1c) 2n+1

    d) 2n-2

    6. If a binary tree is constructed using nodes with two pointers each, how many null pointers does a tree with Nnodes havea) n-1b) nc) n+1

    d) Depends on the number of edges

    7. Which of following statements about heap is wronga) An n element heap has height log n(base of log is 2)b) Smallest element of heap is always a leaf

    c) A array in reverse sorted order is a heapd) A heap can't contain any element more than once

    8. When applets are downloaded from web sites , a byte verifier performs _________?

    9. For the following C programvoid insert(key,r)

    typekey key,data array r;{extern int n;if(n>=max) /*error table if full */else r[n++].k=key;}This on executing, enables aa) Basic sequential search

    b) Binary searchc) Interpolation searchd) None

    10. Find the outputof the following C program

    void f(char *p){p=(char *) malloc(6);strcpy(p,"hello");}void main( ){char *P="bye";f(p);

    printf("%s',p);}

    12. Path testing isa) Black box testing strategyb) White box testing strategy

    c) An installation .........d) An enviornment

  • 7/29/2019 apt qn 28-01-13

    4/4

    14. Which one of the following can't be used to find an internet address given the domain namea) /etc/hostb) NIS yellow pagesc) DNSd) ARP

    15. Flow control is necessary for the transport protocol layer due to the following reasonsa) Unreliable linkb) Congestion at receiverc) Packets out of sequenced) None of these

    16. In public key encryption, if A wants to send a message to B so that no one else can read the message then Aencrypts the message usinga) A's public keyb) A's private keyc) B's public keyd) B's private key

    17. Which of the following is not condition having a deadlock resource previous granted can be forcebly taken awayfrom a processa) Resources need to be used in mutually exclusion fashionb) Process can request new resources, as they continue to hold on to old onesc) Here is a cycle in the resource allocation graph

    17. The range of the 32 bit number in two's complement form is _______

    19. Activation record will contain the

    a) Storage for simple namesb) Information about attributes for local namesc) Return addressd) All of the above

    20. Global static variable within a file is intended toa) Localize swapb) Retain value persistentlyc) Define constantd) Fixed address in memory

    21. Why is thread switch faster than a process switch

    22. What is the binary equivalent of 41.6875

    24. DHCP is used fora) IP address allocationb)dynamic host configuration protocol

    25. For the following C programint x(char *a){a=(char *) malloc(10*sizeof(char));*a="hello";}main(){char *a="new";x(a);printf("%s",a);}The output isa) Hellob) Newc) Hello newd) Run time error