GATE CS 2023 · Question 35 · Programming and Data Structures · Numerical answer (NAT) · 1 mark · no negative marks

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 ", (x+y)); return 0;

Answer

Answer 7

Answer from the official GATE CS 2023 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes