Programming with C

⌘K
  1. Home
  2. Docs
  3. Programming with C
  4. Input/Output statements
  5. Pre-processor directives
  6. Pragma directive

Pragma directive

It is used to specify diverse options to the compiler. The options are specific for the compiler and the platform used

Syntax

#pragma token-sequence

Example

#include<stdio.h>
#pragma option -C
int main()
{
	/* Comment 
	/* Inner Comment */
	End of outer comment */
	printf("Nested comments are not allowed \n");
	printf("pragma option -c allow nested comments");
	return 0;
}

Output

Nested comments are not allowed
pragma option -c allow nested comments

Views: 0

How can we help?

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments