I\'ve been playing around with the assembly output switch for GCC:
gcc -S -c helloworld.c
helloworld.c:
#i
EDIT: this is not actually an answer to the original question, but since it's getting upvoted the info seems to be useful, so...
It's an optimization by GCC. Since your string does not contain any formatting characters and ends with a newline, GCC replaces the call with puts
which produces the same output but is much faster (since it doesn't need to scan the string for formatting specifiers). Try something like:
int main(int argc, char *argv[]){
printf("Hello World!\nargc=%d", argc);
return 0;
}
And you will see your printf
in the assembly.