Consider the following program in C:
The output of the program is ________. (answer in integer)
Note: Assume that the program compiles and runs successfully.
c
Programming in CFunctions, Parameter Passing, Scope Rules, RecursionNAT1 markMedium
1#include <stdio.h>
2void func(int i, int j) {
3 if(i < j) {
4 int i = 0;
5 while (i < 10) {
6 j += 2;
7 i++;
8 }
9 }
10 printf("%d", i);
11}
12int main() {
13 int i = 9, j = 10;
14 func(i, j);
15 return 0;
16}
17A GATE question every morning
One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.