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

How can I change their mode to binary?

789


What is structure padding and packing in c?

714


What are the parts of c program?

743


what is the function of pragma directive in c?

748


What is volatile c?

639






How will you delete a node in DLL?

765


Sir i need notes for structure,functions,pointers in c language can you help me please

2032


Is c is a middle level language?

696


What is the equivalent code of the following statement in WHILE LOOP format?

895


Where we use clrscr in c?

797


What is the difference between array and pointer in c?

691


What are the different types of objects used in c?

657


What is the use of a semicolon (;) at the end of every program statement?

923


Why we use void main in c?

691


Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol

763