How would you stop a class from class from being derived or
inherited?The constructer should not be Private,as object
instantiation should be allowed.

Answer Posted / s.v.vignesh

heyy .. very simple yar..
juz add final keyword b4 t class..
u cannot inherit tat class.....

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()

691


When should I use unitbuf flag?

682


Is it possible to get the source code back from binary file?

835


Write a struct time where integer m, h, s are its members?

607


What it is and how it might be called (2 methods).

746






What is meant by iomanip in c++?

713


Why do we need runtime polymorphism in c++?

645


What is constant in c++ with example?

722


Explain the use of virtual destructor?

707


What is c++ virtual inheritance?

689


What do manipulators do?

665


What is the difference between multiple and multilevel inheritance in c++?

718


What information can an exception contain?

750


What is iomanip c++?

684


Differentiate between C and C++.

798