Menu
Popular Courses
Search

MCQs


Total Questions : 76 | Page 4 of 8 pages
Question 31.

The new operator


  1.    returns a pointer to the variable
  2.    creates a variable called new
  3.    obtains memory for a new variable
  4.    tells how much memory is available
 Discuss Question
Answer: Option C. -> obtains memory for a new variable



Question 32.

A library function exit() causes an exit from


  1.    the loop in which it occurs
  2.    the block in which it occurs
  3.    the function in which it occurs
  4.    the program in which it occurs
 Discuss Question
Answer: Option D. -> the program in which it occurs



Question 33.

The actual source code for implementing a template function is created when


  1.    The declaration of function appears.
  2.    The function is invoked.
  3.    The definition of the function appears.
  4.    None of the above.
 Discuss Question
Answer: Option B. -> The function is invoked.


Question 34.

Overloading the function operator


  1.    requires a class with an overloaded operator.
  2.    requires a class with an overloaded [ ] operator.
  3.    allows you to create objects that act syntactically like functions.
  4.    usually make use of a constructor that takes arguments.
 Discuss Question
Answer: Option A. -> requires a class with an overloaded operator.


Question 35.

The statement f1.write((char*)&obj1, sizeof(obj1));


  1.    writes the member function of obj1 to f1.
  2.    Writes the data in obj1 to f1.
  3.    Writes the member function and the data of obj1 to f1.
  4.    Writes the address of obj1 to f1.
 Discuss Question
Answer: Option B. -> Writes the data in obj1 to f1.



Question 36.

The keyword friend does not appear in


  1.    the class allowing access to another class.
  2.    the class desiring access to another class.
  3.    the private section of a class.
  4.    the public section of a class.
 Discuss Question
Answer: Option C. -> the private section of a class.



Question 37.

To access the public function fbase() in the base class, a statement in a derived class function fder() uses the statement.fbase();


  1.    fbase();
  2.    fder();
  3.    base::fbase();
  4.    der::fder();
 Discuss Question
Answer: Option A. -> fbase();


Question 38.

Which of the following expressions is illegal?


  1.    (10 6).
  2.    (false && true)
  3.    bool (x) = (bool)10;
  4.    float y = 12.67;
 Discuss Question
Answer: Option C. -> bool (x) = (bool)10;


Question 39.

RunTime Polymorphism is achieved by ______


  1.    friend function
  2.    virtual function
  3.    operator overloading
  4.    function overloading
 Discuss Question
Answer: Option B. -> virtual function



Question 40.

To convert from a user defined class to a basic type, you would most likely use.


  1.    A built-in conversion function.
  2.    A one-argument constructor
  3.    A conversion function that’s a member of the class.
  4.    An overloaded ‘=‘ operator
 Discuss Question
Answer: Option C. -> A conversion function that’s a member of the class.


Share this page with your friends!

Share this page with your friends!

Latest Videos

Chapter 1 - GLOBAL STEEL SCENARIO & INDI Part 1 : (13-04-2024) INDUSTRY AND COMPANY AWARENESS (ICA)
Direction Sense Test Part 1 Reasoning (Hindi)
Chapter 1 - RMHP / OHP / OB & BP Part 1 : (14-02-2024) GPOE 2024
Cube & Cuboid Part 1 Reasoning (Hindi)
Data Interpretation (DI) Basic Concept Reasoning (Hindi)
Counting Figures Part 1 Counting Of Straight Lines Reasoning (Hindi)
Real Numbers Part 7 Class 10 Maths
Real Numbers Part 1 Class 10 Maths
Polynomials Part 1 Class 10 Maths

Latest Test Papers

Chapter 1.1 : INTRODUCTION Chapter 1 : Raw Material Handling Plant GPOE/GPA 2024
Chapter 1.1 : Personnel Functions- An ov Chapter 1 : Personnel Management GFM 2024
Chapter 3.1 : INTRODUCTION Chapter 3 : Sinter Plant GPOE/GPA 2024
Chapter 2.3 : COAL HANDLING PLANT - Set Chapter 2 : Coke Ovens and Coal Chemicals GPOE/GPA 2024
Chapter 2.1 : Overview Chapter 2 : Materials Management GFM 2024