why all c++ program must have default constructor?
Answer Posted / varsha
Default constructor and destructor gice compilers a place to
hide the code such as invocation of contructors of Base
classes and non static data members.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is :: operator in c++?
How can you tell what shell you are running on unix system?
What are literals in C++?
Explain what are the sizes and ranges of the basic c++ data types?
What is the role of C++ shorthand's?
What are the different types of comments allowed in c++?
Can I learn c++ without knowing c?
Is map ordered c++?
Does dev c++ support c++ 11?
how can i access a direct (absolute, not the offset) memory
address?
here is what i tried:
wrote a program that ask's for an address from the user,
creates a FAR pointer to that adress and shows it. then the
user can increment/decrement the value in that address by
pressing p(inc+) and m(dec-).
NOW, i compiled that program and opened it twice (in 2
different windows) and gave twice the same address to it.
now look what happen - if i change the value in
one "window" of the program, it DOES NOT change in the
other! even if they point to the same address in the memory!
here is the code snippet:
//------------------------------------------------------
#include What is the most common mistake on c++ and oo projects? Is the declaration of a class its interface or its implementation? an integer constant must have atleast one
a) character
b) digit
c) decimal point What function initalizes variables in a class:
a) Destructor
b) Constitutor
c) Constructor What is void pointer in c++ with example?