Home > Back-end >  C language simple questions for help
C language simple questions for help

Time:10-31

#include
#include
The main ()
{
Char k [100];
FILE *fp;
The scanf (" % s ", k);
Fp=fopen (" pa ", "w");
The fputs (k, fp);
fclose(fp);

}
Small white c language, this code is to store a character, how can I use a similar approach to store multiple characters, the Internet also tried the method, but I still don't understand, so to you for help,

CodePudding user response:

You is to deposit a string to a file?

CodePudding user response:

You add a few for loop, put a few enter a number, then it is ok to cycle a few times, if the storage array in more simple
  • Related