#include <stdio.h> int main() { printf(5 + "abhishekdas\n") ; return 0 ; } The output of the program is hekdas . How is it working? Shouldn't it show error? How is it possible to write something like 5 + "abhishekdas" inside printf function ?
printf(5 + "abhishekdas"). Simple as that. As to why it works: addition is commutative, so5 + "string"is the same as"string" + 5, which is simple pointer arithmetic. Also,5["foobarbaz"]works as well, for the same reason. Duplicate hundreds of times.