What is size of empty class object

Answer Posted / manish shikarbar

answer is :1

Example:

class Test
{
};

Test Obj;

int size = sizeof(Obj); // answer is 1

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain stack unwinding.

865


What are friend classes? What are advantages of using friend classes?

876


Explain linear search.

851


What is size_type?

750


What are references in c++? What is a local reference?

804


Do vectors start at 0 c++?

773


What does the following code do: int c=0; cout< a) Undefined *Updated* b) 01 c) 00

856


How important is c++?

751


What is wrapper class in c++?

844


What is the use of turbo c++?

791


What is an overflow error?

877


Can constructor be private in c++?

805


write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num

2434


What is an incomplete type in c++?

1002


Are there interfaces in c++?

776