Answer A Hello
Let us analyse the code:
- #include <stdio.h>
- #define crypt(s,t,u,m,p,e,d) m##s##u##t
- #define begin crypt(a,n,i,m,a,t,e)
- int begin()
- {
- printf("Hello\n");
- return 0;
- }
Line 1 : includes stdio.h
Line 2: defined a macro crypt. It accepts 7 characters are makes a string with fourth, first, third and second letters and replaces the macro call with the result string. eg: crypt(b,d,c,a,e,f) replaces with abcd
Line 3: says that wherever string begin occurs, compiler should replace it with crypt(a,n,i,m,a,t,e) ie string main
Line 4: compiler sees begin here. Immediately it replaces begin with the string main (See point 3)
Now line 4 becomes int main()
Compiler detects a main programs. Thus function begin() is equivalent to main () program
hence "Hello" is printed.