620 views
3 votes
3 votes
#include<stdio.h>
#define decode(s,t,a,m,p,e,d)m##s##u##t
#define begin decode(a,n,i,m,a,t,e)
int begin()
{
    printf("hello");
}

2 Answers

1 votes
1 votes
There is no error. ## does string concatenation in a macro. So, macro will expand as follows:

begin -> decode(a,n,i,m,a,t,e) -> m##a##i##n -> main

So, the function name becomes main and program prints "hello"

Related questions