Sail E0 Webinar

MCQs

Total Questions : 147 | Page 5 of 15 pages
Question 41. Inline functions may not work ______ . 1. If function contain static variables. 2. If function contain global and register variables. 3. If function returning value consists looping construct(i.e. for, while). 4. If inline functions are recursive. 5. If function contains const value.
  1.    Only 1,4,5
  2.    Only 2,3,5
  3.    Only 1,3,4
  4.    All of these
 Discuss Question
Answer: Option C. -> Only 1,3,4
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 42. Which of the followings is/are not false about friend function ? 1. It can be called / invoked with class object. 2. It has objects as arguments. 3. It can have built-in types as arguments. 4. It must declared only in public part of a class. 5. It does not have this pointer as an argument.
  1.    Only 2,4
  2.    Only 1,2,5
  3.    Only 2,3,5
  4.    All of these
 Discuss Question
Answer: Option C. -> Only 2,3,5
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 43. Default values for a function are need to be specified from left to right only.
  1.    True
  2.    False
 Discuss Question
Answer: Option B. -> False
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 44. Default return type of functions in CPP is ____ .
  1.    void
  2.    long
  3.    char
  4.    Int
 Discuss Question
Answer: Option D. -> Int
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 45. If we have object from fstream class, then what is the default mode of opening the file?
  1.    ios::in|ios::out
  2.    ios::in|ios::out|ios::trunc
  3.    ios::in|ios::trunc
  4.    Default mode depends on compiler
 Discuss Question
Answer: Option D. -> Default mode depends on compiler
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 46. __________ is return type of is_open() function.
  1.    int
  2.    bool
  3.    float
  4.    char *
 Discuss Question
Answer: Option B. -> bool
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 47. During a class inheritance in CPP, if the visibility mode or mode of derivation is not provided, then by default visibility mode is ___________.
  1.    public
  2.    protected
  3.    private
  4.    Friend
 Discuss Question
Answer: Option C. -> private
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 48. The derivation of Child class from Base class is indicated by ____ symbol.
  1.    ::
  2.    :
  3.    ;
  4.    |
 Discuss Question
Answer: Option B. -> :
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 49. Public data members and member functions of the class are accessible ONLY to the member functions of that class.
  1.    True
  2.    False
 Discuss Question
Answer: Option B. -> False
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 50. Only functions of the class can access the data of the class and they(functions) provides the interface between data, objects and the program. This kind isolation of the data from direct access by the program is called _______________ .
  1.    Data Abstraction
  2.    Data Hiding
  3.    Data Binding
  4.    Data Encapsulation
 Discuss Question
Answer: Option B. -> Data Hiding
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!

Latest Videos

Latest Test Papers