#pragma warn directive in c programming language

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.

List of warning code in c programming languge:

1 comment:

sachchidanand said...

plz send me all details of progma directives and its example with solution