C
Christopher Benson-Manica
Given the following:
char s[15]="Hello, world\n!";
Are all the following guaranteed to produce the same output?
printf( "%s", s );
fprintf( stdout, "%s", s );
fwrite( s, sizeof(char), sizeof(s)/sizeof(char) - 1, stdout );
(It's the last of these that I'm specifically wondering about.)
char s[15]="Hello, world\n!";
Are all the following guaranteed to produce the same output?
printf( "%s", s );
fprintf( stdout, "%s", s );
fwrite( s, sizeof(char), sizeof(s)/sizeof(char) - 1, stdout );
(It's the last of these that I'm specifically wondering about.)