C Language MCQ - English
How many times the program will print "Study 2 Online" ? #include<stdio
Home | Discussion Forum
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) 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) The keyword used to transfer control from a function back to the calling function is
3) What will be the output of the program?#include<stdio.h>
int fun(int, int);
typedef int (*pf) (int, int);
int proc(pf, int, int);
int main()
{
printf("%d\n", proc(fun, 6, 6));
return 0;
}
int fun(int a, int b)
{
return (a==b);
}
int proc(pf p, int a, int b)
{
return ((*p)(a, b));
}
4) What will be the output of the program?#include<stdio.h>
int fun(int);
int main()
{
float k=3;
fun(k=fun(fun(k)));
printf("%f\n", k);
return 0;
}
int fun(int i)
{
i++;
return i;
}
5) What will be the output of the program?#include<stdio.h>
int check (int, int);
int main()
{
int c;
c = check(10, 20);
printf("c=%d\n", c);
return 0;
}
int check(int i, int j)
{
int *p, *q;
p=&i;
q=&j;
i>=45 ? return(*p): return(*q);
}