How to avoid structure padding in C?

Answer Posted / akshay singh

i think for avoid structure padding you use only the #pragma pack(1) its sufficient for structure padding
i am not sure about windows application this concept i used in linux or unix

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

The file stdio.h, what does it contain?

876


Is Exception handling possible in c language?

1788


What is a structure and why it is used?

838


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

846


Define C in your own Language.

817


What does the c preprocessor do?

841


What is main () in c language?

830


Is there a way to compare two structure variables?

829


Explain how can type-insensitive macros be created?

756


Explain how do you sort filenames in a directory?

796


What are high level languages like C and FORTRAN also known as?

902


What are the basic data types associated with c?

1024


How old is c programming language?

773


The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

910


What is "Duff's Device"?

891