Sail E0 Webinar

MCQs

Total Questions : 25 | Page 1 of 3 pages
Question 1.

The macro va_arg is used to extract an argument from the fixed micro argument list and 

advance the pointer to the next argument.


  1.    Yes
  2.    No
 Discuss Question
Answer: Option B. -> No


Question 2.

It is necessary to call the macro va_end if va_start is called in the function.


  1.    Yes
  2.    No
 Discuss Question
Answer: Option A. -> Yes


Question 3.

Can the fixed arguments passed to the function that accepts variable argument list, 

occur at the end?


  1.    Yes
  2.    No
 Discuss Question
Answer: Option B. -> No


Question 4.

Can we write a function that takes a variable argument list and passes the list to another function?


  1.    Yes
  2.    No
 Discuss Question
Answer: Option A. -> Yes


Question 5.

Is it necessary that in a function which accepts variable argument list there should be 

at least be one fixed argument?


  1.    Yes
  2.    No
 Discuss Question
Answer: Option A. -> Yes


Question 6.

While defining a variable argument list function we drop the ellipsis(...)?


  1.    Yes
  2.    No
 Discuss Question
Answer: Option A. -> Yes


Question 7.

va_list is an array that holds information needed by va_arg and va_end


  1.    True
  2.    False
 Discuss Question
Answer: Option A. -> True


Question 8.

A function that receives variable number of arguments should use va_arg() to extract the 

last argument from the variable argument list.


  1.    True
  2.    False
 Discuss Question
Answer: Option B. -> False


Question 9.

The macro va_start is used to initialise a pointer to the beginning of the list of fixed arguments.


  1.    True
  2.    False
 Discuss Question
Answer: Option B. -> False


Question 10.

Can we pass a variable argument list to a function at run-time?


  1.    Yes
  2.    No
 Discuss Question
Answer: Option B. -> No

Every actual argument list must be known at compile time. In that sense it is not truly a 

variable argument list.


Latest Videos

Latest Test Papers