×

C Programs

C Basic & Conditional Programs

C Looping Programs

C String Programs

C Miscellaneous Programs

C Preprocess Operator (#)

By IncludeHelp Last updated : March 10, 2024

What is Preprocess Operator in C?

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

C 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.