What is the purpose of #pragma directives in C?



What is the purpose of #pragma directives in C?..

Answer / nashiinformaticssolutions

#pragma provides compiler-specific instructions.
Example:
#pragma pack(1) // Forces 1-byte alignment for structures
struct Example {
char a;
int b;
};

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Where are the auto variables stored?

0 Answers   TISL,


Write a program to produce the following output in c language? 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1

2 Answers  


What is %lu in c?

0 Answers  


what is diff between localstatic and globalstatis variable possible 2 use in another file...?

2 Answers   HCL,


write a function to swap an array a[5] elements like a[0] as a[5],a[1] as a[4],....a[5] as a[0].without using more than one loop and use one array not to use temp array?

1 Answers   Zensar,






What are the similarities between c and c++?

0 Answers  


what is the difference between malloc() and calloc() function?

1 Answers  


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

0 Answers  


enum day = { jan = 1 ,feb=4, april, may} what is the value of may? a)4 b)5 c)6 d)11 e)none of the above

8 Answers   HCL, Wipro,


Is there any possibility to create customized header file with c programming language?

0 Answers  


What are the uses of pre-processor directives?

2 Answers  


write a c program to find the probability of random numbers between 1-1000

0 Answers   ADS,


Categories