What is size of a empty class?
Answer Posted / mashal
Size of an empty class is 1 byte. It is non zero to ensure that the two different objects will have different addresses.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which programming language's unsatisfactory performance led to the discovery of c++?
What are the uses of c++ in the real world?
What is polymorphism and its type in c++?
Is the declaration of a class its interface or its implementation?
Can we get the value of ios format flags?
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 do you mean by late binding? What is java and c++? List the features of oops in c++? Define a pointer to a data member of the type pointer to pointer? What's the order in which the objects in an array are destructed? What is a sequence in c++? Can you please explain the difference between overloading and overriding? what is data abstraction in C++? Explain terminate() and unexpected() function?