Token Pasting Operator (##) is sometimes called a merging or combining operator. It is used to merge two valid tokens, it is the reason we called it token concatenation. See the below example code,
#include <stdio.h>
#define MERGE(token1, token2) token1##token2
int main()
{
int var1 = 10;
int var2 = 20;
int var3 = 30;
printf("%d\n", MERGE(var, 1));
printf("%d\n", MERGE(var, 2));
printf("%d\n", MERGE(var, 3));
return 0;
}
Answer:
Token Pasting Operator (##) is sometimes called a merging or combining operator. It is used to merge two valid tokens, it is the reason we called it token concatenation. See the below example code,
Output: 10 ,20,30
need an explanation for this answer? contact us directly to get an explanation for this answer