Sail E0 Webinar

MCQs

Total Questions : 147 | Page 6 of 15 pages
Question 51. A Constructor that does not have any parameters is called____________ Constructor.
  1.    Custom
  2.    Dynamic
  3.    Static
  4.    Default
 Discuss Question
Answer: Option D. -> Default
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 52. _______________ is a member function that is declared within a base class and redefined by derived class.
  1.    virtual function
  2.    static function
  3.    friend function
  4.    const member function
 Discuss Question
Answer: Option A. -> virtual function
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 53. If we have object from ofstream class, then default mode of opening the file is _____ .
  1.    ios::in
  2.    ios::out
  3.    ios::in|ios::trunc
  4.    ios::out|ios::trunk
 Discuss Question
Answer: Option D. -> ios::out|ios::trunk
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 54. When a base class is privately inherited by the derived class, then_____________ .
  1.    protected members of the base class become private members of derived class
  2.    public members of the base class become private members of derived class
  3.    both a and b
  4.    only b
 Discuss Question
Answer: Option C. -> both a and b
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 55. We can initialize a value of static variable of a class only when its object is created. No other initialization is permitted.
  1.    True
  2.    False
 Discuss Question
Answer: Option B. -> False
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 56. Syntax for Pure Virtual Function is ______________ .
  1.    virtual void show()==0
  2.    void virtual show()==0
  3.    virtual void show()=0
  4.    void virtual show()=0
 Discuss Question
Answer: Option C. -> virtual void show()=0
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 57. Logical expressions produce ____________ type results.
  1.    explicit
  2.    garbage
  3.    bool
  4.    static
 Discuss Question
Answer: Option C. -> bool
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 58. A friend function does not have 'this' pointer associated with it.
  1.    True
  2.    False
 Discuss Question
Answer: Option A. -> True
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 59. In nested try blocks, if both inner and outer catch handlers are not able to handle the exception, then ______________ .
  1.    Compiler executes only executable statements of main().
  2.    Compiler issues compile time errors about it.
  3.    Program will be executed without any interrupt.
  4.    Program will be terminated abnormally.
 Discuss Question
Answer: Option D. -> Program will be terminated abnormally.
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 60. What is the difference between protected and private access specifiers in inheritance?
  1.    private member is not inheritable and not accessible in derived class.
  2.    protected member is inheritable and also accessible in derived class.
  3.    Both are inheritable but private is accessible in the derived class.
  4.    Both are inheritable but protected is not accessible in the derived class.
 Discuss Question
Answer: Option B. -> protected member is inheritable and also accessible in derived class.
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!

Latest Videos

Latest Test Papers