Sail E0 Webinar

MCQs

Total Questions : 147 | Page 4 of 15 pages
Question 31. Streams that will be performing both input and output operations must be declared as class _________ .
  1.    iostream
  2.    fstream
  3.    stdstream
  4.    Stdiostream
 Discuss Question
Answer: Option B. -> fstream
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 32. Exception handlers are declared with ____________ keyword.
  1.    Try
  2.    catch
  3.    throw
  4.    Finally
 Discuss Question
Answer: Option B. -> catch
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 33. Which of the following statements are true about Catch handler? 1. It must be placed immediately after try block T. 2. It can have multiple parameters. 3. There must be only one catch handler for every try block. 4. There can be multiple catch handler for a try block T. 5. Generic catch handler can be placed anywhere after try block.
  1.    Only 1, 4, 5
  2.    Only 1, 2, 3
  3.    Only 1, 4
  4.    Only 1, 2
 Discuss Question
Answer: Option C. -> Only 1, 4
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 34. Static variable declared in a class are also called_________ .
  1.    instance variable
  2.    named constant
  3.    global variable
  4.    class variable
 Discuss Question
Answer: Option D. -> class variable
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 35. Private members of the class are accessible only to the members of the same class.
  1.    True
  2.    False
 Discuss Question
Answer: Option B. -> False
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 36. Which of the following is not a false statement about new operator?
  1.    It can’t be overloaded.
  2.    It returns garbage value when memory allocation fails.
  3.    It automatically computes the size of the data object.
  4.    All of these
 Discuss Question
Answer: Option C. -> It automatically computes the size of the data object.
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 37. Which of the following operator is used to release the dynamically allocated memory in CPP?
  1.    remove
  2.    free
  3.    delete
  4.    both b and c
 Discuss Question
Answer: Option C. -> delete
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 38. Run time polymorphism can be achieved with______ .
  1.    Virtual Base class
  2.    Container class
  3.    Virtual function
  4.    Both a and c
 Discuss Question
Answer: Option C. -> Virtual function
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 39. Catch handler can have multiple parameters.
  1.    True
  2.    False
 Discuss Question
Answer: Option B. -> False
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!
Question 40. To create an output stream, we must declare the stream to be of class ___________ .
  1.    ofstream
  2.    ifstream
  3.    iostream
  4.    None of these
 Discuss Question
Answer: Option A. -> ofstream
NO EXPLANATION IS AVAILABLE FOR THIS QUESTION!

Latest Videos

Latest Test Papers