CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS LANGUAGES C DETAILS
Question :
What is a pragma?
Category C Interview Questions
Rating (4.4) By 51 users
Added on 10/22/2004
Views 6017
Rate it!
Answers:

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)



ya we can use better way
#pragma pre processor
In case of structure memory is padding while declaring of structure
to over come this problem better way....
we write our code as follows
#pragma pack(push)
#pragma pack(1)
place this before structure we can aviod padding in structure



 Posted by: kumar    

Contact kumar  Contact kumar

the pragma is define a set of programm



 Posted by: chandan    

Contact chandan  Contact chandan


If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
What is #line used for?
View Answer
How do you override a defined macro?
View Answer
How can you check to see whether a symbol is defined?
View Answer
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
View Answer
How can I convert a number to a string?
View Answer
How can I convert a string to a number?
View Answer
How do you print only part of a string?
View Answer
What is indirection?
View Answer
How many levels of pointers can you have?
View Answer
What is a null pointer?
View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL C Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/1019/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

1.41