#pragma directives in c programming language

#pragma directives in c programming language by examples and questions

#pragma inline only tells the compiler that source code of program contain inline assembly language code .In C we can write assembly language program with help of asm keyword.

Describe #pragma warn directive?
Answer:

In c there are many warning messages which can be on or off with help of #pragma warn.
Syntax :

#pragma warn +xxx
#pragma warn –xxx
#pragma warn .xxx

Where
+ means on
- means off
. means on/off (toggle)

xxx is indicate particular warning code in thee alphabet e.g rvl is warning code which means function should return a value.

#pragma warn –rvl
int main(){
Printf(“It will not show any warning message”);
}

Output: It will not show any warning message
When you will execute the above program then compiler will not show the warning message function should return a value because rvl warning is off.

5 comments:

manish said...

plz send me program of all #pragma like hdrfile,hdrstp any many more plz urgent....my e mail is manish_jawla@yahoo.co.in

mayank said...

well writtenn

Anonymous said...

plz send me program of all #pragma like hdrfile,hdrstp any many more plz urgent....my e mail is piyushkhurana9@gmail.com

piyush

Anonymous said...

plz send me program of all #pragma like hdrfile,hdrstp any many more plz urgent....my e mail is aarvind.0001@gmail.com

arvind said...

plz send me program of all #pragma like hdrfile,hdrstp any many more plz urgent....my e mail is aarvind.0001@gmail.com