C Functions Questions and Answers

Practice Mode
Showing 10 of 151 questions
Q81
size of a function is known as
  • A Function call
  • B function Recursion
  • C function Frame
  • D Function prototype
Answer: Option C
Q82
Return value of a funtion stores in
  • A Stack area
  • B Data area
  • C Code area
  • D Heap area
Answer: Option A
Q83
Any function return value is stored in which register.
  • A CX
  • B CS
  • C DS
  • D AX
Answer: Option D
Q84
Find the output void main ( ) { int x=10, y=20, p,q; p=add (x,y); q=add (x,y); printf("%d %d", p,q); } add (int a, int b) { a+=a; b+=b; return (a); return (b); }
  • A 10 10
  • B 20 20
  • C 10 20
  • D 20 10
Answer: Option B
Q85
Forward communication is only possible through
  • A Pass by value
  • B Pass by address
  • C Return type
  • D Both a and b
Answer: Option D
Q86
storage class of a function is defined when
  • A Function prototype is declared
  • B Function body is defined
  • C Function call
  • D None of these
Answer: Option B
Q87
Find the output void main () { int x=5, y=6; change (&x, &y); prrintf("%d %d", x,y); } change (int *x, int *y) { int temp=1; temp^=*x; *x^=*y; *y^=temp; }
  • A 5 6
  • B 6 5
  • C 3 2
  • D None of these
Answer: Option C
Q88
Find the output void main () { int i=2; printf("%d", see (i)); } see (i) { return i*i; }
  • A Compilation error
  • B 2
  • C 4
  • D None of these
Answer: Option C
Q89
Which of the following is true?
  • A Nested function call is allowed in C.
  • B The functions should be called in the order of their definitions in the source code.
  • C C follows bottom-up modular approach.
  • D A function name can begin with an underscore
Answer: Option D
Q90
Find the output void main () { int x[5]; see (x); printf("%d", x[2]); } see (int x[ ] ) { x++; x[1]=100; }
  • A 100
  • B 0
  • C Garbage
  • D None of these
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test