C #pragma
Example
#pragma token
Various compilers may offer distinct implementations of the #pragma directive.
The turbo C++ compiler is compatible with the following #pragma directives.
Example
#pragma argsused
#pragma exit
#pragma hdrfile
#pragma hdrstop
#pragma inline
#pragma option
#pragma saveregs
#pragma startup
#pragma warn
Let's explore a basic illustration demonstrating the utilization of the #pragma preprocessor directive.
Example
Example
#include<stdio.h>
#include<conio.h>
void func() ;
#pragma startup func
#pragma exit func
void main(){
printf("\nI am in main");
getch();
}
void func(){
printf("\nI am in func");
getch();
}
Output:
Output
I am in func
I am in main
I am in func