C Language MCQ - English
Point out the error in the program
#include<stdio.h>
int main
Home | Discussion Forum
int main
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");
}
Answer : A
View More Related Question
1) Which of the following statements are correct about the program?#include<stdio.h>
int main()
{
printf("%p\n", main());
return 0;
}
View Answer
2) Which of the following is not a library function:
3) 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;
}
4) 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));
}
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