C Language MCQ - English
What will be the output of the program?
#include<stdio.h>
int
Home | Discussion Forum
int
What will be the output of the program?#include<stdio.h>
int fun(int(*)());
int main()
{
fun(main);
printf("Hi\n");
return 0;
}
int fun(int (*p)())
{
printf("Hello ");
return 0;
}
Answer : C
View More Related Question
1) Which of the following statements are correct about the function?
long fun(int num)
{
int i;
long f=1;
for(i=1; i<=num; i++)
f = f * i;
return f;
}
View Answer
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) Point out the error in the program f(int a, int b)
{
int a;
a = 20;
return a;
}
View Answer
4) 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
5) What will be the output of the program?#include<stdio.h>
int check(int);
int main()
{
int i=45, c;
c = check(i);
printf("%d\n", c);
return 0;
}
int check(int ch)
{
if(ch >= 45)
return 100;
else
return 10;
}