what is the size of a class which contains no member
variables but has two objects??? is it 1 or 2??
Answer Posted / asghar ali chandio
every object will occypy one byte of memory. If objects are
two then Size will be two bytes.
| Is This Answer Correct ? | 5 Yes | 8 No |
Post New Answer View All Answers
What is protected inheritance?
What is meant by the term name mangling in c++?
How a macro differs from a template?
What is the benefit of c++?
What is bubble sort c++?
What are virtual functions in c++?
What is the C-style character string?
What is copy constructor? Can we make copy constructor private in c++?
What are the sizes and ranges of the basic c++ data types?
What is a driver program?
Explain class invariant.
write a program that withdrawals,deposits,balance check,shows mini statement. (using functions,pointers and arrays)
Is java based off c++?
What is recursion?
I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.