GATE CS 2023 (Forenoon) — Question 35

Programming in CFunctions, Parameter Passing, Scope Rules, RecursionNAT1 markMedium

The integer value printed by the ANSI-C program given below is ________
c
1#include<stdio.h>
2int funcp( ) {
3    static int x = 1;
4    x++;
5    return x;
6}
7int main( ) {
8    int x, y;
9    x = funcp( );
10    y = funcp( ) + x;
11    printf("%d\n", (x + y));
12    return 0;
13}
14
Practise the full 2023-FN paper
Challenge a friend: WhatsApp Telegram
From RENYXERAPractise this subject in the exam simulatorTimed, GATE-style tests with analytics that find your weak topics.
Practise more on Functions, Parameter Passing, Scope Rules, RecursionTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group