C Functions Questions and Answers
Practice ModeShowing 10 of 151 questions
Q131
Which of the following data structure used in function recursion.
Answer: Option A
Q132
When variable are push into the function frame address of variable are
Answer: Option B
Q133
When variables are push into stack, that stack pointer (SP) growing
Answer: Option A
Q134
Find the output
int n=0, R;
void main ( )
{
R=0;
printf("%d %d", fun (n), R);
}
int fun (int n)
{
if (n>3)
return R=5;
R=6;
return (1);
}
Answer: Option C
Q135
Find the output
static int c;
void f(int n)
{
int i;
for (i =1; i<=n;i++)
f (n-i);
c++;
}
void main ( )
{
extern int c;
f (5);
printf ("%d",c);
}
Answer: Option A
Q136
Find the output
void fun (int, int*);
void main ( )
{
int j, i=5;
int *inptr;
intptr=&j;
j=i;
printf("%d %d", i, j);
fun (j, intptr);
printf(" %d %d", i, j);
}
void fun ( int k, int *iptr)
{
k++;
(*iptr) ++;
return;
}
Answer: Option A
Q137
Find the output
void main ( )
{
int i=4;
if (i>5)
printf ("Hi");
else
f(i);
}
f (int j)
{
if (j>=4) f(j-1);
else if (j==0)return;
printf ("%d",j);
return;
}
Answer: Option B
Q138
Find the output
int *NEXT (register nt i)
{
char *ipt;
ipt=&i;
ipt++;
*ipt=1;
return ipt;
}
int j=1;
printf("%d", *(NEXT (J)));
}
Answer: Option C
Q139
Find the output
funct ( char* str)
{
printf ("%s", str);
}
void main( )
{
static int ii=1;
int jj=5;
ii+=++jj;
funct(ii++"Campus Intervies");
}
Answer: Option B
Q140
Find the output
funct (str)
{
printf("%s", str);
}
void main ( )
{
funct('-'-'-'+"CIMPLE");
}
Answer: Option A