Files
DEV/DEV.1.1/Fichiers/ecriture-fichier/fputs.c
Emmanuel Srivastava 642ed7f857 update
2024-12-08 23:45:04 +01:00

16 lines
286 B
C

#include <stdio.h>
#include <stdlib.h>
/*fputs(<chaîne de caractère>, <fichier>) : écrit une chaîne de caractère*/
int main(void){
FILE *fic = fopen("text.txt", "w");
char mot[]="Bonjour";
if(fic==NULL)
{exit(1);}
fputs(mot,fic);
fclose(fic);
}