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

Can an array be an Ivalue?

666


What is a c token and types of c tokens?

591


What is a protocol in c?

559


Can a program have two main functions?

572


Why isnt any of this standardized in c?

639






How can I invoke another program (a standalone executable, or an operating system command) from within a c program?

655


What does & mean in scanf?

604


what will be maximum number of comparisons when number of elements are given?

1410


How many levels of pointers have?

595


what is the syallabus of computer science students in group- 1?

1844


How can I trap or ignore keyboard interrupts like control-c?

620


What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?

746


What are the application of c?

650


What is the function of volatile in c language?

668


Explain what are multibyte characters?

629