CodesJava

Easy learning with example program codes

c preprocessor pragma


C #pragma:

The #pragma is a preprocessor directive which is used to get additional information related to machine or operating-system features by the compiler.

Some of the commonly used #pragma directives are:

  • #pragma argsused
  • #pragma exit
  • #pragma hdrfile
  • #pragma hdrstop
  • #pragma inline
  • #pragma option
  • #pragma saveregs
  • #pragma startup
  • #pragma warn

 

Syntax:

#pragma_directives identifiers

Example:

#include<stdio.h>  
 
void first() ;  
#pragma startup first 
#pragma exit first 
 
void main()
{  
printf("\nBye C.");  
}  
 
void first()
{  
printf("\nHello C.");  
}

Output

Hello C.
Bye C.
Posted in C   
Sign Up/ Sign In
Ask a Question


Industrial Training

We offers Placement Oriented Training on Java, Spring, JSF, Hibernate, PHP, AngularJS, Angular 4, PLSQL, Oracle BI Publisher etc. We also provides Online training, please mail us at hr@codesjava.com.

Development

We also provides the Development services for Website Development , Java Development, PHP Development, Android App Development etc. You can contact us on hr@codesjava.com.

Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki