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

Where are c variables stored in memory?

1082


What are the advantages of union?

1072


how to print the character with maximum occurence and print that number of occurence too in a string given ?

2481


how to write a c program to print list of fruits in alpabetical order?

2306


Is swift based on c?

1113


What is a file descriptor in c?

1141


What is time null in c?

1082


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

3095


What are header files and what are its uses in C programming?

1248


What is wrong with this code?

1192


What is null pointer in c?

1005


How can you find the day of the week given the date?

1206


Hai what is the different types of versions and their differences

1945


Compare array data type to pointer data type

1044


Can you return null in c?

1176