The # Preprocessor Operator Example in C | C preprocessor programs

The # Preprocessor Operator Example in C: Here, we will learn how the # operator works in C programming language.
By IncludeHelp Last updated : March 10, 2024

# Preprocessor Operator

The # is a preprocessor operator, which is used to convert an argument into string i.e. quoted string.

# Preprocessor Operator Example

#include <stdio.h>

#define STR(X)	#X

int main(){
	
	printf("%s\n",STR(Hello world!));
	printf("%s\n",STR(How are you?));
	printf("%s\n",STR(I love programming!));
	
	return 0;
}

Output

Hello world!
How are you?
I love programming!

C Preprocessors Programs »

Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.