C Language MCQ - English
What will be the output of the program?
#include<stdio.h>
i
Home | Discussion Forum
i
What will be the output of the program? #include<stdio.h>
int i;
int fun();
int main()
{
while(i)
{
fun();
main();
}
printf("Hello\n");
return 0;
}
int fun()
{
printf("Hi");
}
Answer : A
View More Related Question
1) What will be the output of the program?#include<stdio.h>
int main()
{
int i=1;
if(!i)
printf("Study2Online,");
else
{
i=0;
printf("C-Program");
main();
}
return 0;
}
View Answer
2) Point out the error in the program#include<stdio.h>
int main()
{
int a=10;
void f();
a = f();
printf("%d\n", a);
return 0;
}
void f()
{
printf("Hi");
}
3) What will be the output of the program?#include<stdio.h>
#include<stdlib.h>
int main()
{
int i=0;
i++;
if(i<=5)
{
printf("Study2Online");
exit(1);
main();
}
return 0;
}
View Answer
4) Which of the following statements are correct about the program?#include<stdio.h>
int main()
{
printf("%p\n", main());
return 0;
}
View Answer
5) What will be the output of the program?#include<stdio.h>
int fun(int i)
{
i++;
return i;
}
int main()
{
int fun(int);
int i=3;
fun(i=fun(fun(i)));
printf("%d\n", i);
return 0;
}