What is size of a object of following class?
class Foo
{
public:
void foo(){}
}

Answer Posted / sirama

Size of the Object 1 Byte (ie) 8 bits. Because that is
minimum possible size required to allocate something on
memory.

Say If a Create the Object like Foo obj;
Something needs to loaded on Stack. But, actually it does
not have any internal data memebers. Hence, the minimum
possible is 1 Byte.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What will the line of code below print out and why?

330


What do you mean by late binding?

621


Explain the uses of static class data?

599


What do you mean by translation unit?

606


Show the application of a dynamic array with the help of an example.

588






What is c++ vb?

616


What is constructor c++?

670


If you hear the cpu fan is running and the monitor power is still on, but you did not see anything show up in the monitor screen. What would you do to find out what is going wrong?

551


What is microsoft c++ redistributable?

616


How would you implement a substr() function that extracts a sub string from a given string?

569


What is the use of structure in c++?

555


Why ctype h is used in c++?

525


What is abstract class in c++?

592


Describe Trees using C++ with an example.

608


What are c++ variables?

540