C examples for String:String Console Input
What does the following program do, read string and output
#include <stdio.h> #include <string.h> int main(void) { char buffer[256]; printf( "Enter your name and press <Enter>:\n"); gets_s( buffer );// w w w . ja va 2s. co m printf( "\nYour name has %d characters and spaces!", strlen( buffer )); return 0; }