+ 1
How this statement in C is evaluated?
I was asked to choose the output for this statement in C. printf(6+"Hello World!");
4 Réponses
+ 4
I will add another hint to William Owens answer. The literal string "Hello World" evaluates as a pointer (char *). Think of the expression being evaluated in the context of pointer arithmetic.
+ 1
Think about the indice numbering.
The first argument in the printf function is a pointer to a char.
+ 1
W
+ 1
Alhaaj [LESS ACTIVE] ,Close try running it in a main function and see the output, why do you think the output is slightly different?