Logo 
Search:

C++ Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C++ ProgrammingRSS Feeds

Which the following is true regarding the statement? - const simple m(a,b); - Select option

  Shared By: Isabel Hughes    Date: Sep 19    Category: C++ Programming    Views: 1862

Answer:

The following statement creates a constant object of a class simple:

const simple m(a,b);

Which the following is true regarding the above statement?

Options

a) The compiler generates compile-time error if you try to change the values of ‘a’ and ‘b’
b) Const member is a function prototype
c) The compiler generates an error if m tries to invoke non-const member functions
d) All of the above

Answer : d) All of the above

Share: 
 



Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: