Which of the following statements are correct about the function?
lon

Home | Discussion Forum

Which of the following statements are correct about the function?

long fun(int num)
{
int i;
long f=1;
for(i=1; i<=num; i++)
f = f * i;
return f;
}

View More Related Question

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

3) Which of the following statements are correct about the function?

long fun(int num)
{
int i;
long f=1;
for(i=1; i<=num; i++)
f = f * i;
return f;
}

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

5) What will be the output of the program?

#include<stdio.h>
int i;
int fun1(int);
int fun2(int);

int main()
{
extern int j;
int i=3;
fun1(i);
printf("%d,", i);
fun2(i);
printf("%d", i);
return 0;
}
int fun1(int j)
{
printf("%d,", ++j);
return 0;
}
int fun2(int i)
{
printf("%d,", ++i);
return 0;
}
int j=1;

UP Gk Online Test

taiyari24hour.com

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