PREVIOUS YEAR SOLVED PAPERS - GATE 2019

36. Consider the following C function.
void convert(int n){
if(n<0)
printf(“%d”,n);
else {
convert(n/2);
printf(“%d”,n%2);
}
}
Which one of the following will happen when the function convert is called with any positive integer n as argument?

  • Option : D
  • Explanation :
    It will not print anything and will not terminate
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


37. Consider the following C program:
#include
int r(){
static int num=7;
return num--;
}
int main(){
for (r();r();r())
printf(“%d”,r());
return 0;
}
Which one of the following values will be displayed on execution of the programs? A

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


38. Consider three machines M, N, and P with IP addresses 100.10.5.2, 100.10.5.5, and 100.10.5.6 respectively. The subnet mask is set to 255.255.255.252 for all the three machines. Which one of the following is true?

  • Option : C
  • Explanation :

    N and P belongs to same subnet.
    Hence, C is correct answer.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


39. Suppose that in an IP-over-Ethernet network, a machine X wishes to find the MAC address of another machine Y in its subnet. Which one of the following techniques can be used for this?

  • Option : C
  • Explanation :
    X sends an ARP request packet with broadcast MAC address in its local subnet
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


40. Consider three 4-variable functions f1, f2, and f3, which are expressed in sum-of-minterms as
f1 = Σ(0, 2, 5, 8, 14), f2 = Σ(2, 3, 6, 8, 14, 15), f3 = Σ (2, 7, 11, 14)
For the following circuit with one AND gate and one XOR gate, the output function f can be expressed as:

  • Option : A
  • Explanation :
    f1 . f2 = Σ(2, 8, 14)
    f1 = f3⊕ (f1 . f2)
    = Σ(7, 8, 11)
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


Related Quiz.
GATE 2019