/*string.c */ /*a program for getting an input string and display it on the screen */ /*author: Weiwei Chen Nov.15.2010 */ #include #define SLEN 80 int main(void) { char str[SLEN]; /*definition of a string named str*/ printf("Please input a string: "); scanf("%s", str); /*get the input of a string and store it in str*/ printf("The string is: %s\n", str); /*display the input string str on the screen*/ return 0; }