Gate CS-2019 Question Paper With Solutions

Q. 36 Consider the following C program:

#include<stdio.h>    int r(){   int static 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) 41

(B) 52

(C) 63

(D) 630

Answer: (B)

Explanation:

Learn More:   Gate ME 2014-4 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here