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 use of #pragma pack, wer it is used?

Answer Posted / ram

actually pragma pack is used for structure padding
we are having #pragma pack 0,#pragma pack 1,#pragma pack
2,#pragma pack 3,#pragma pack 4
in this first one will allocate memory 4 bytes for every
data type
in second one i.e in pack 1 it allocates 1 byte for every
data type
in third one i.e in pack 2 it allocates 2 bytes for every
data type
in fourth one i.e pack 3 it allocates 3 bytes for every data
type
in fifth one i.e pack 4 it allocates 4 bytes for every data type

Actually pragma will be used in powers of 2 only

Is This Answer Correct ?    3 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a lookup table in c?

1177


Which header file is essential for using strcmp function?

1545


Describe the order of precedence with regards to operators in C.

1105


how many errors in c explain deply

2138


Can we declare a function inside a function in c?

1097


In c programming language, how many parameters can be passed to a function ?

1172


What is a #include preprocessor?

1226


Do you have any idea about the use of "auto" keyword?

1135


What are structural members?

1068


What are the rules for identifiers in c?

1122


What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

1948


What are linked lists in c?

1181


Do you know the use of 'auto' keyword?

1267


Why does the call char scanf work?

1264


Write a program in c to replace any vowel in a string with z?

1177