GATE 2016 (Session 1) Computer Science and Information Technology (CS) Questions with Solutions

GATE 2016 (Session 1)

65 questions

MCQ 39 · NAT 261-mark 30 · 2-mark 35

Questions 41–45 of 65

Q41IO Interface2 marksNAT
The size of the data count register of a DMA controller is 16 bits. The processor needs to transfer a file of 29,154 kilobytes from disk to main memory. The memory is byte addressable. The minimum number of times the DMA controller needs to get the control of the system bus from the processor to transfer the file from the disk to main memory is ____.

Q42Pipeline Processor2 marksNAT
The stage delays in a 4-stage pipeline are 800,500,400 and 300 picoseconds.The first stage (with delay 800 picoseconds)is replaced with a functionally equivalent design involving two stages with respective delays 600 and 350 picoseconds.The throughput increase of the pipeline is ________ percent.

Q43Asymptotic Notation2 marksMCQ−0.67 if wrong
Consider a carry lookahead adder for adding two n-bit integers,built using gates of fan-in at most two. The time to perform addition using this adder is

Q44Loop2 marksMCQ−0.67 if wrong
The following function computes the maximum value contained in an integer array p[] of size n (n>=1).
 
int max(int*p, int n){
   int a=0,b=n-1;
   while (__________){
   if (p[a]<=p[b]){a=a+1;} 
   else {b=b-1;}
   }
   return p[a];
}
The missing loop condition is

Q45Function2 marksMCQ−0.67 if wrong
What will be the output of the following C program?

void count(int n){
   static int d=1;
   printf("%d ",n);
   printf("%d ",d);
   d++;
   if(n>1) count(n-1);
   printf("%d ",d);
}
void main(){
    count(3);
}