C Functions Questions and Answers

Practice Mode
Showing 10 of 151 questions
Q71
Find the output void main () { char *p="hai"; char q[ ]="bye"; pass (p,q); printf("%s %s", p,q); } pass (char *p, char q[ ] ) { p='H'; q='B"; }
  • A Hai Bye
  • B hai bye
  • C None portable pointer conversion
  • D None of these
Answer: Option B
Q72
Find the output void main ( ) { int t; int pascal mu1 ( ); t=mu1 (3,4,5,6); printf("%d", t); } int pascal mu1 (int x, int y, int z) { return (y*z); }
  • A 30
  • B 12
  • C 20
  • D Compilation error
Answer: Option A
Q73
Find the output void main ( ) { int t; int pascal mu1 ( ); t=mu1 (3,4,5,6); printf("%d", t); } int pascal mu1 (int x, int y, int z) { return (y*z); }
  • A 30
  • B 12
  • C 20
  • D Compilation error
Answer: Option A
Q74
When a function called to itself directly or indirectly, that is called
  • A Function recursion
  • B Self referenctial function
  • C Library function
  • D None of those
Answer: Option A
Q75
Find the output void main () { int p; p=sub (x( ), y ( ), z( )); printf ("%d", p); } int sub(int a, int b, int c, int d) return (a-b-c); } int x ( ) {return 15;} int y ( ) {return 5;} int z () (return 2;}
  • A Garbage value
  • B 8
  • C Compilation error
  • D 15
Answer: Option B
Q76
Find the output void main ( ) { int i; float f=3. 14; float compute ( float ); i=compute ( f ); printf ("%d",i); } float compute (float x) { if (x==3.14) return ( 0); else return (1); }
  • A Suffering
  • B Garbage
  • C 0
  • D 1
Answer: Option D
Q77
Recursion
  • A Execution is faster.
  • B Additional storage space is not required.
  • C A queue is needed to process the recursion.
  • D Helps in writing compact code.
Answer: Option D
Q78
main () is a
  • A user defined function
  • B Library function
  • C Keyword
  • D None of these
Answer: Option A
Q79
Find the output void main ( ) { int i = 100; float f=5.413; print (i, f); } printf( "%d %f", i, f); }
  • A 100 5.413
  • B 100 5.000
  • C 100 0.000
  • D Compilation error
Answer: Option C
Q80
Find the output void main ( ) { int x=10, y; y=choose (x); printf("%d",y); } choose (y) { int y; if (y>=5) return (y); else return (0); }
  • A 10
  • B 0
  • C Can't determine
  • D Compilation error
Answer: Option D
Questions and Answers for Competitive Exams Various Entrance Test