Sail E0 Webinar

MCQs

Total Questions : 147 | Page 3 of 15 pages
Question 21. C structure differs from CPP class in regards that by default all the members of the structure are __________ in nature.
  1.    private
  2.    protected
  3.    public
  4.    None of these
 Discuss Question
Answer: Option C. -> public
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 22. Which of the followings are true about constructors? 1. A class can have more than one constructor. 2. They can be inherited. 3. Their address can be referred. 4. Constructors cannot be declared in protected section of the class. 5. Constructors cannot return values.
  1.    Only 1,2,4
  2.    1,2,4,5
  3.    1,3,5
  4.    1,4,5
 Discuss Question
Answer: Option D. -> 1,4,5
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 23. Which of the following are true about static member function? 1. They can access non-static data members. 2. They can call only other static member functions. 3. They can access global functions and data. 4. They can have this pointer. 5. They cannot be declared as const or volatile.
  1.    Only 2
  2.    Only 2,5
  3.    Only 2,3,4,5
  4.    Only 2 , 3 , 5
  5.    All of these
 Discuss Question
Answer: Option D. -> Only 2 , 3 , 5
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 24. Which of the following best defines the syntax for template function ?
  1.    Template
  2.    Template return_type Function_Name(Parameters)
  3.    Both a and b
  4.    None of these
 Discuss Question
Answer: Option C. -> Both a and b
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 25. Generic pointers can be declared with__________ .
  1.    auto
  2.    void
  3.    asm
  4.    None of these
 Discuss Question
Answer: Option B. -> void
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 26. Static variable must be declared in public section of the class.
  1.    True
  2.    False
 Discuss Question
Answer: Option B. -> False
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 27. By default, if a function with minimum lines of code is declared and defined inside the class becomes Inline function.
  1.    True
  2.    False
 Discuss Question
Answer: Option A. -> True
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 28. When base class is derived in protected mode, then_____________ . 1. public members of base class become private members of derived class. 2. public members of base class become protected members of derived class. 3. public members of base class become public members of derived class. 4. protected members of base class become protected members of derived class. 5. protected members of base class become private members of derived class. 6. protected members of base class become public members of
  1.    Only 1, 5
  2.    Only 1, 6
  3.    Only 2, 6
  4.    Only 2, 4
 Discuss Question
Answer: Option D. -> Only 2, 4
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 29. Can we have overloading of the function templates?
  1.    Yes
  2.    No
 Discuss Question
Answer: Option A. -> Yes
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 30. Class X, class Y and class Z are derived from class BASE. This is ______ inheritance.
  1.    Multiple
  2.    Multilevel
  3.    Hierarchical
  4.    Single
 Discuss Question
Answer: Option C. -> Hierarchical
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!

Latest Videos

Latest Test Papers