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


Please Help Members By Posting Answers For Below Questions

What is bubble sort c++?

674


What are references in c++?

764


Write my own zero-argument manipulator that should work same as hex?

683


What are the two shift operators and what are their functions?

665


Write a program using merge () function to combine the elements of array x[ ] and y[ ] into array z[ ].

688






How do we balance an AVL Tree in C++?

731


Why is it necessary to use a reference in the argument to the copy constructor?

717


What does new in c++ do?

650


What is the difference between object-oriented programming and procedural programming?

788


What is the use of setfill in c++?

677


What does the nocreate and noreplace flag ensure when they are used for opening a file?

761


What are the differences between new and malloc?

717


What is the use of endl in c++ give an example?

715


If you want to share several functions or variables in several files maitaining the consistency how would you share it?

651


Why we use #include conio h in c++?

690