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

Home | Discussion Forum
Taiyari24Hour

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

2) The keyword used to transfer control from a function back to the calling function is

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

4) Point out the error in the program

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

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

UP Gk Online Test

taiyari24hour.com

Study 2 Online Says....
Kindly log in or signup.