Some
Questions & Answer 1.
In a sequential search, what is the average number
of comparisons it takes to search through n elements
?
Ans: (n+1)/2.
2. What is the size of
the array declared as double * X[5] ?
Ans. 5 * sizeof ( double * )
3. A binary search tree
with node information as 1,2,3,4,5,6,7,8 is given.
Write the result obtained on preorder traversal
of the binary search tree ?
Ans : 53124768
4. If size of the physical
memory is 232-1, then what is the size of the
virtual memory ?
5. S -> A0B A-> BB|0
B-> AA|1
How many strings of length 5 are possible with
the above productions?
6. (3*4096+15*256+3*16+3).
How many 1's are there in the binary representation
of the result ?
Ans. 10
7. In memory mapped I/O
how is I/O is accessed ?
8. What is the use of ALE
in 8085 ?
Ans. To latch the lower byte of the address.
9. If the logical memory
of 8 X 1024 is mapped into 32 frames, then the
number of bits for the logical address are____
?
Ans. 13
10. Context free grammar
is useful for which purpose ?
|