C++/c++

Advertisement


Question
ques1.if a class without any variable is declared then how mouch space it takes in memory?

ques2.if a class with some variable is declared then how mouch space it takes in memory?

ques3.


Answer
Functions don't take any memory. However, virtual functions take some memory. Generally dynamic implementation might use some extra memory. Use sizeof() to get the actual size of the object (excluding the size of dynamically allocated memory in that object).

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Sam

Expertise

You may ask me about simple to complicated C/C++ programming methods/style and most like questions about network programming in C++.

Experience

I'm a professional programer in C++ and network/internet programming.

©2016 About.com. All rights reserved.