Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2019
Questions

Q27

MCQ2 marks, −0.67Programming

Consider the following C program:

#include <stdio.h>
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?

Sign in to save attempts.

Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.