The keyword used to transfer control from a function back to the calling functio

Home | Discussion Forum

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

View More Related Question

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

2) What will be the output of the program?

#include<stdio.h>
int sumdig(int);
int main()
{
int a, b;
a = sumdig(123);
b = sumdig(123);
printf("%d, %d\n", a, b);
return 0;
}
int sumdig(int n)
{
int s, d;
if(n!=0)
{
d = n%10;
n = n/10;
s = d+sumdig(n);
}
else
return 0;
return s;
}

3) Point out the error in the program

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

4) What will be the output of the program?

#include<stdio.h>
int main()
{
int i=1;
if(!i)
printf("Study2Online,");
else
{
i=0;
printf("C-Program");
main();
}
return 0;
}

5) What will be the output of the program?

#include<stdio.h>
int main()
{
int fun(int);
int i = fun(10);
printf("%d\n", --i);
return 0;
}
int fun(int i)
{
return (i++);
}

UP Gk Online Test

taiyari24hour.com