if we compile and execute this program
the output will be :Code:#include <stdio.h> int main ( void ) { char buffer[BUFSIZ]; printf ( "Enter a string: " ); if ( fgets ( buffer, sizeof buffer, stdin ) != NULL ) printf ( "|%s|\n", buffer ); return 0; }
can i know why ?!!Code:|test |
because in the code there is no newline char btw. %s and the |