The #pragma command gives the programmer the ability to tell the compiler to do certain things. Since the #pragma command is implementation specific, uses vary from compiler to compiler. One option might be to trace program execution.

Below are some compiler families, the operating system on which they're found and the pragma directives which are part of that implementation

Also pragma is used to allow the programmer to call a function before main is called or after main exits.

Packing is an optimization method that makes the members of structures, classes, and unions align to a factor of the packing boundary. This usually makes it easier (thus faster) for the processor to access data since it's packed to align with what the processor is used to dealing with, however it costs memory by having random unnecessary garbage data inserted to align the code with the pack. the numerical value in parenthesis must be a factor of 2 (2, 4, 8, 16, 32, 64….). There are other ways to use “pack” and they're described below but above is the simplest and most common way. you can use

#pragma pack() /* with empty parenthesis */

to reset the packing to the compiler default.

← #pragma pack(push) and #pragma pack(pop) are on the way, I'm still researching them and their functionality. -/>
← This document is still under construction, I intend to continue adding compilers and their pragma options instead of leaving this largely blank. -GinoMan -/>