Interview Questions

What are pragmas and what are they good for?

C Interview Questions and Answers


(Continued from previous question...)

What are pragmas and what are they good for?

The #pragma directive provides a single, well-defined ``escape hatch'' which can be used for all sorts of (nonportable) implementation-specific controls and extensions: source listing control, structure packing, warning suppression (like lint's old /* NOTREACHED */ comments), etc.

(Continued on next question...)

Other Interview Questions