What is a pragma?

The #pragma preprocessor directive allows each compiler to implement compiler-specific features that can be turned on and off with the #pragma statement. For instance, your compiler might support a feature called loop optimization. This feature can be invoked as a command-line option or as a #pragma directive. To implement this option using the #pragma directive, you would put the following line into your code: #pragma loop_opt(on) Conversely, you can turn off loop optimization by inserting the following line into your code: #pragma loop_opt(off)

Showing Answers 1 - 2 of 2 Answers

soma praveen kumar

  • Mar 29th, 2007
 

consider an example

struct  a
{
char a;
int b;
char c;
};

sizeof struct a is 12 instead of 6

if we declare #pragma() Before struct a
Then size will Be 6.
  

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions