String I/O
puts writes a string to standard outputgets reads a string from standard input, and interprets the newline character as ‘\0’. int puts(char *); char *gets(char *);
fgets and fputs are the same functions for streams (files).char *fgets(char *s,int size,FILE * fp); int fputs (char *s,FILE *fp);
Other commands for strings:#include <stdio.h> ….. FILE *fp = fopen(“some_file.txt”,”w+”); float version; char name[] = “John Doe”; char buff[1000]; printf(“%s”,name); fprintf(fp,”%s”,name); fscanf(fp,”%s”,&buf); sprintf(buf,”%s %f”,name,version);