C Language MCQ - English
There is a error in the below program. Which statement will you add to remove it
Home | Discussion Forum 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);
}
Answer : B
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) Point out the error in the program f(int a, int b)
{
int a;
a = 20;
return a;
}
View Answer
3) 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");
}
4) What will be the output of the program?#include<stdio.h>
int addmult(int ii, int jj)
{
int kk, ll;
kk = ii + jj;
ll = ii * jj;
return (kk, ll);
}
int main()
{
int i=3, j=4, k, l;
k = addmult(i, j);
l = addmult(i, j);
printf("%d %d\n", k, l);
return 0;
}
5) Which of the following is not a library function: