Computer Sciences > GATE 2026 SET-1 > C Programming
Consider the following program in C:
The output of the program is _________. (answer in integer)
Note: Assume that the program compiles and runs successfully.
#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.
Correct : 9
Similar Questions
Consider the following two functions
void fun1(int n){
if(n == 0) return;
printf(β%dβ, n);
fun2(n-2);
&...
Consider the C functions foo and bar given below:
int foo(int val)
{
int x = 0;
while (val > 0)
{
&nbs...
What is printed by the following ANSI C program?
#include<stdio.h>
int main(int argc, char *argv[])
{
int a[3][3][3] =
{{...
Total Unique Visitors
Loading......