C Language MCQ - English
How many times the program will print "Study 2 Online" ? #include<stdio.h>
int main()
{
printf("Study 2 Online");
main();
return 0;
}
Answer : D
View More Related Question
1) The keyword used to transfer control from a function back to the calling function is
2) 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
3) What will be the output of the program?#include<stdio.h>
int reverse(int);
int main()
{
int no=5;
reverse(no);
return 0;
}
int reverse(int no)
{
if(no == 0)
return 0;
else
printf("%d,", no);
reverse (no--);
}
4) How many times the program will print "Study 2 Online" ? #include<stdio.h>
int main()
{
printf("Study 2 Online");
main();
return 0;
}
5) There is a error in the below program. Which statement will you add to remove it?#include<stdio.h>
int main()
{
int a;
a = f(10, 3.14);
printf("%d\n", a);
return 0;
}
float f(int aa, float bb)
{
return ((float)aa + bb);
}
View Answer