Logo F2FInterview

C Advanced Interview Questions

Q   |   QA

Pragma is implementation specific directive i.e each pragma directive has different implementation rule and use. There are many type of pragma directive and varies from one compiler to another compiler .If compiler does not recognize particular pragma the it simply ignore that pragma statement without showing any error or warning message and execute the whole program assuming this pragma statement is not present.
For example suppose there is any pragma directive is #pragma world.

#include<stdio.h>
#pragma world
int main(){
    printf("C is powerful language ");
    return 0;
}

Output: C is powerful language
Explanation:
Since #pragma world is unknown for Turbo c 3.0 compilers so it will ignore this directive without showing any error or warning message and execute the whole program assuming #pragma world statement is not present.

List of pragma directives in turbo c 3.0:

1. #pragma startup
2. #pragma exit
3. #pragma warn
4. #pragma option
5. #pragma inline
6. #pragma argsused
7. #pragma hdrfile
8. #pragma hdrstop
9. #pragma saveregs

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: