Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the difference in size of this two clasees?
Class A
{
int a;
char c;
float f;
}
Class B
{
float f;
char c;
int a;
}

Answer Posted / som shekhar

well there will be no difference..define the macro
#pragma pack(1) and then calculate the size of the class....

Actually compiler aligns the boundary to the nearest larger
byte. If you define the aforementioned macro, compiler will
give you the exact size of the class.

Hope that is clear.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

2634


What are static variables?

1141


What is the difference between public, private, and protected access?

1071


Write a c program for binary addition of two 8 bit numbers.

4124


which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?

1182


Explain what is oop?

1095


What is singleton pattern in c++?

997


Is c++ still being used?

1029


What is function overloading in C++?

1428


What is an arraylist c++?

1220


How do I run a program in notepad ++?

1112


What is the difference between public and private data members?

1181


Is main a class in c++?

1006


In inline " expression passed as argument are evalauated once " while in macro "in some cases expression passed as argument are evaluated more than once " --> i am not getting it plz help to make me understand....

2423


If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?

1104