Sail E0 Webinar

MCQs

Total Questions : 38 | Page 4 of 4 pages
Question 31. To which does the function pointer point to?
  1.    variable
  2.    constants
  3.    function
  4.    absolute variables
 Discuss Question
Answer: Option C. -> function


function


Question 32. What is the default calling convention for a compiler in c++?
  1.    __cdecl
  2.    __stdcall
  3.    __pascal
  4.    __fastcall
 Discuss Question
Answer: Option A. -> __cdecl


__cdecl


Question 33. What are the mandatory part to present in function pointers?
  1.    &
  2.    retrun values
  3.    data types
  4.    none of the mentioned
 Discuss Question
Answer: Option C. -> data types


The data types are mandatory for declaring the variables in the function pointers.


Question 34. which of the following can be passed in function pointers?
  1.    variables
  2.    data types
  3.    functions
  4.    none of the mentioned
 Discuss Question
Answer: Option C. -> functions


functions


Question 35. If the user didn't supply the user value means, then what value will it take?
  1.    default value
  2.    rise an error
  3.    both a & b
  4.    none of the mentioned
 Discuss Question
Answer: Option A. -> default value


If the user didn't supply the value means, the compiler will take the given value in the argument list.


Question 36. Which value will it take when both user and default values are given?
  1.    user value
  2.    default value
  3.    custom value
  4.    none of the mentioned
 Discuss Question
Answer: Option A. -> user value


The default value will be used when the user value is not given, So in this case, the user value will be taken.


Question 37. What is meaning of following declaration?
int(*ptr[5])();
  1.    ptr is pointer to function.
  2.    ptr is array of pointer to function.
  3.    ptr is pointer to such function which return type is array.
  4.    ptr is pointer to array of function.
 Discuss Question
Answer: Option B. -> ptr is array of pointer to function.


In this expression, ptr is array not pointer.


Question 38. Where does the default parameter can be placed by the user?
  1.    leftmost
  2.    rightmost
  3.    both a & b
  4.    none of the mentioned
 Discuss Question
Answer: Option B. -> rightmost


rightmost


Latest Videos

Latest Test Papers