Menu
Popular Courses
Search

MCQs


Total Questions : 30 | Page 3 of 3 pages
Question 21. Which is called on allocating the memory for array of objects?
  1.    destructor
  2.    constructor
  3.    method
  4.    None of the mentioned
 Discuss Question
Answer: Option B. -> constructor


When you allocate memory for an array of objects, the default constructor must be called to construct each object. If no default constructor exists, you're stuck needing a list of pointers to objects.


Question 22. Which is similar to template specialization?
  1.    template
  2.    function overloading
  3.    function template overloading
  4.    None of the mentioned
 Discuss Question
Answer: Option C. -> function template overloading


function template overloading


Question 23. How many types of specialization are there in c++?
  1.    1
  2.    2
  3.    3
  4.    4
 Discuss Question
Answer: Option B. -> 2


There are two types specialization. They are full specialization and partial specialization.


Question 24. What is other name of full specialization?
  1.    explicit specialization
  2.    implicit specialization
  3.    function overloading template
  4.    None of the mentioned
 Discuss Question
Answer: Option A. -> explicit specialization


explicit specialization


Question 25. Which is dependant on template parameter?
  1.    base class
  2.    abstract class
  3.    method
  4.    None of the mentioned
 Discuss Question
Answer: Option A. -> base class


base class


Question 26. Which value is placed in the base class?
  1.    derived values
  2.    default type values
  3.    both a & b
  4.    None of the mentioned
 Discuss Question
Answer: Option B. -> default type values


We can place the default type values in a base class and overriding some of them through derivation.


Question 27. Which is used to get the input during runtime?
  1.    cout
  2.    cin
  3.    coi
  4.    None of the mentioned
 Discuss Question
Answer: Option B. -> cin


cin is mainly used to get the input during the runtime.


Question 28. How many bits of memory needed for internal representation of class?
  1.    1
  2.    2
  3.    4
  4.    no memory needed
 Discuss Question
Answer: Option D. -> no memory needed


classes that contain only type members, nonvirtual function members, and static data members do not require memory at run time.


Question 29. How many kinds of entities are directly parameterized in c++?
  1.    1
  2.    2
  3.    3
  4.    4
 Discuss Question
Answer: Option C. -> 3


C++ allows us to parameterize directly three kinds of entities through templates: types, constants, and templates.


Question 30. How many kinds of parameters are there in C++?
  1.    1
  2.    2
  3.    3
  4.    4
 Discuss Question
Answer: Option C. -> 3


There are three kinds of parameters are there in C++. They are type, non-type, template.


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
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 3.1 : Overview of Finance & Acco Chapter 3 : Finance & Accounts SAIL E0 - GFM 2024
Chapter 2.1 : Overview Chapter 2 : Materials Management SAIL E0 - GFM 2024
Chapter 1.1 : Personnel Functions- An ov Chapter 1 : Personnel Management SAIL E0 - GFM 2024
GPOE / GPA Combined 1 Free CBT Mock Test SAIL E0 2024
CBT Mixed Test 1 GPOE/GPA SAIL E0 2024