Point out the error in the program
   f(int a, int b)
{
i

Home | Discussion Forum

Point out the error in the program

   f(int a, int b)
{
int a;
a = 20;
return a;
}

View More Related Question

1) 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;
}

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;
}

3) What will be the output of the program?

#include<stdio.h>
void fun(int);
typedef int (*pf) (int, int);
int proc(pf, int, int);
int main()
{
int a=3;
fun(a);
return 0;
}
void fun(int n)
{
if(n > 0)
{
fun(--n);
printf("%d,", n);
fun(--n);
}
}

4) Point out the error in the program

   f(int a, int b)
{
int a;
a = 20;
return a;
}

5) 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");
}

UP Gk Online Test

taiyari24hour.com