PREVIOUS YEAR SOLVED PAPERS - August 2016 Paper 2

11. Given i= 0, j = 1, k = – 1 x = 0.5, y = 0.0 What is the output of given ‘C’ expression ? x * 3 & & 3 || j | k

  • Option : C
  • Explanation :
    According to given data:
    x * 3 && 3 || j | k
    = 1.5 && 3 || j | k
    = 1 || j |k
    = 1
    So, option (C) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


12. The following ‘C’ statement : int * f [ ] ( ); declares:

  • Option : B
  • Explanation :
    int * f [ ] ( ); is an array of functions returning pointers to integers. For more information on pointers declaration Refer:How to declare a pointer to a function? So, option (B) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


13. If a function is friend of a class, which one of the following is wrong?

  • Option : C
  • Explanation :
    Friend of the class can be member of some other class but Friend functions are not the members of a particular class. For more information on Friend function Refer:Friend class and function in C++ Option (C) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


14. In C++, polymorphism requires:

  • Option : D
  • Explanation :
    Basically polymorphism means having many forms. In C++, polymorphism requires Inheritance, Virtual functions and references, because polymorphism occurs when there is a hierarchy of classes and they are related by inheritance which include virtual functions and references. So, option (D) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


15. A function template in C++ provides _____ level of generalization.

  • Option : C
  • Explanation :
    A function template in C++ provides 2 level of generalization. For more information Refer:Templates in C++ Option (C) is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


Related Quiz.
August 2016 Paper 2