C Functions Questions and Answers

Practice Mode
Showing 10 of 151 questions
Q91
Find the output void main ( ) { bbsr ( ) { printf("bbsr"); ctc ( ) { printf("ctc"); } } printf("puri'); }
  • A puri
  • B bbsrctcpuri
  • C bbsrctc
  • D Compilation error
Answer: Option D
Q92
Which header file must be included to work with dynamic function variables?
  • A stdio.h
  • B stdarc.h
  • C stdarg.h
  • D stddyn.c
Answer: Option C
Q93
A function type is said to be derived from its return type and if its return type is T, The function type is sometime called
  • A function returing T
  • B Function type derivation'
  • C Function prototype
  • D None
Answer: Option A
Q94
Parameters are used
  • A To return values from the called function
  • B to send values from the calling function.
  • C To specify the data type of the return value.
  • D Both options a & b.
Answer: Option B
Q95
Find the output void main ( ) { int a=5; a=find (a+=find (a++); printf("%d",a); } int find (int a) { return ++a; }
  • A 12
  • B 13
  • C 15
  • D None of these
Answer: Option B
Q96
Find the output. void main () { int i=65536; if (i) callme ( ); else callyou ( ); } callme ( ) { printf("Bye"); } callyou ( ) { printf ("welcome"); }
  • A Bye
  • B Welcome
  • C Error, integer constant out of bound
  • D None of these
Answer: Option B
Q97
Find the output void main ( ) { int a=4, b=5; printit (a,b); } printit  (int b, int a) { printf("%d %d", a, b); { int a=0; int b=1; printf("%d %d",a,b); } }
  • A 4 5 0 1
  • B 5 4 0 1
  • C 5 5 0 0
  • D None of these
Answer: Option B
Q98
What is the difference between writing prototype inside a function and outside a function?
  • A The prototype declared above main has more priority than inside the main.
  • B The prototype declared inside the main has more priority than above the main.
  • C The prototype define inside the main then call is only from main() method.
  • D None of these
Answer: Option C
Q99
Consider the printf statement used as below: printf("%d %d", f1 ( ), f2 ( ); /*Assume f1 and f2 as functions returning int*/ Then the order in which the functions f1 and f2 are called is :
  • A Left to right.
  • B Right to left
  • C Dependent on compiler/implementation
  • D None of these
Answer: Option B
Q100
ANSI C supports three kinds of function, such as user defined function, standard library function and
  • A System call function
  • B Derived function
  • C Inter service routines
  • D None of these
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test