Logo 
Search:

C++ Programming FAQ

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

Which is a correct description of the destructor ‘sample’ and includes output statements?

  Shared By: Reginald Fischer    Date: Sep 01    Category: C++ Programming    Views: 560

Answer:

Options

a) sample :: ~sample() {cout << “Welcome”; }
b) sample :: ~sample() { };
c) void ~sample() { }
d) ~sample() { };

Answer : a) sample :: ~sample() {cout << “Welcome”; }

Share: 
 



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


Tagged: