×

C Programs

C Basic & Conditional Programs

C Looping Programs

C String Programs

C Miscellaneous Programs

C Preprocess Operator - Double Hash (##)

By IncludeHelp Last updated : March 10, 2024

What is Double Hash (##) Preprocessor Operator in C?

The ## is a preprocessor operator, which is used to concatenate two tokens. This operator works on two tokens, its takes two tokens and concatenate/combine them in a single token.

Double Hash (##) Preprocessor Operator Example

#include <stdio.h>

#define VAR(X,Y)	X##Y

int main(){
    int ab = 100;
    printf("%d\n",VAR(a,b));	
    return 0;
}

Output

100

C Preprocessors Programs »

Comments and Discussions!

Load comments ↻





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