C Functions Questions and Answers

Practice Mode
Showing 10 of 151 questions
Q131
Which of the following data structure used in function recursion.
  • A Stack
  • B Queue
  • C Tree
  • D None of the above
Answer: Option A
Q132
When variable are push into the function frame address of variable are
  • A Growing up
  • B Growing down
  • C Growing left
  • D Growing right
Answer: Option B
Q133
When variables are push into stack, that stack pointer (SP) growing
  • A Up
  • B Down
  • C Left
  • D Right
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); }
  • A 1 6
  • B 1 6
  • C 1 0
  • D 1 5
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); }
  • A 32
  • B 22
  • C 35
  • D 45
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; }
  • A 5 5 5 6
  • B 5 5 6 6
  • C 5 6 5 6
  • D 5 5 6 5
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; }
  • A 23
  • B 34
  • C 45
  • D 67
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))); }
  • A 0
  • B 1
  • C 11
  • D 257
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"); }
  • A Campus Interview
  • B Interview
  • C nterview
  • D s interview
Answer: Option B
Q140
Find the output funct (str) { printf("%s", str); } void main ( ) { funct('-'-'-'+"CIMPLE"); }
  • A CIMPLE
  • B Garbage
  • C --CIMPLE
  • D Compilation error
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test