Skip to content

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

GateBrew
← GATE CSE 2026 Set 1
Questions

Q24

NAT1 mark

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.

Sign in to save attempts.

The solution is hidden while you attempt this question. It opens once you check or show the answer.