C Expressions and Control Flow questions

Q35

GATE CS 2023 CSC ProgrammingNAT1 mark
The integer value printed by the 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;
}
Show answer without attempting

Answer: 7

0/10 correct0 marks

Related topics in C Programming