+ 1
What will be the output of the following in c: printf( 6 + "hello world" /n)
2 Answers
+ 6
In c, string is not present and it can be considered as char pointer or array of char so, hello world is char* argument to printf. So we can do arithmetic operations + on pointer which moved pointer from zero index to sixth index...
hence world would be output here.
+ 5
printf( 6 + "hello world\n" );
Outputs "world"
But as it is written in your question, it's not gonna work.
If you want to understand this, try modifying the number from 6 to another number and notice the output.