How to avoid structure padding in C?

Answer Posted / ravi

by using #pragma you can avoid structure padding. and that
to u can use it in linux or unix if i m not wrong.

Is This Answer Correct ?    55 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the advantage of a random access file?

644


What is structure padding and packing in c?

627


What are the advantages of union?

633


What do you mean by recursion in c?

634


Explain the difference between #include "..." And #include <...> In c?

635






How can I find the modification date of a file?

708


How does free() know explain how much memory to release?

623


Is null always equal to 0(zero)?

589


Why shouldn’t I start variable names with underscores?

629


How can I remove the trailing spaces from a string?

620


a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode

663


#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }

724


Where define directive used?

611


to find the closest pair

1827


which is an algorithm for sorting in a growing Lexicographic order

1403