C examples for String:String Function
Use gets_s() and puts() functions to read and output string
#include <stdio.h> #define STLEN 81/*from w w w . j a v a 2s . co m*/ int main(void){ char words[STLEN]; puts("Enter a string, please."); gets_s(words); // typical use printf("Your string twice:\n"); printf("%s\n", words); puts(words); puts("Done."); return 0; }