Skip to content

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

GateBrew
← GATE CSE 2023
Questions

Q25

NAT1 markProgramming

The integer value printed by the ANSI-C\textsf{ANSI-C} program given below is _______________

#include<stdio.h>
int funcp(){
    static int x = 1;
    x++;
    return x;
}
int main(){
    int x,y;
    x = funcp();
    y = funcp()+x;
    printf("%d\n", (x+y));
    return 0;
}
Sign in to save attempts.

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