C Language MCQ - English
Point out the error in the program
f(int a, int b)
{
i
Home | Discussion Forum
{
i
Point out the error in the program f(int a, int b)
{
int a;
a = 20;
return a;
}
Answer : C
View More Related Question
1) What will be the output of the program?#include<stdio.h>
int func1(int);
int main()
{
int k=35;
k = func1(k=func1(k=func1(k)));
printf("k=%d\n", k);
return 0;
}
int func1(int k)
{
k++;
return k;
}
2) 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");
}
3) 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
4) Which library function returns number of seconds elapsed beyond a designated base time?
5) How many times the program will print "Study 2 Online" ? #include<stdio.h>
int main()
{
printf("Study 2 Online");
main();
return 0;
}