GATE CS 2026, set 1 · Question 34 · Programming and Data Structures · Numerical answer (NAT) · 1 mark · no negative marks

Consider the following program in C:
#include <stdio.h> void func(int i, int j) { if(i < j) { int i = 0; while (i < 10) { j += 2; i++; } } printf("%d", i); } int main() { int i = 9, j = 10; func(i, j); return 0; }
The output of the program is ______. ( answer in integer )
Note : Assume that the program compiles and runs successfully.

Answer

Answer 9

Answer from the official GATE CS 2026 answer key.

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