19 lines
508 B
C
Executable File
19 lines
508 B
C
Executable File
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
int main (int argc, char * argv[], char * envp[])
|
|
{
|
|
FILE *leFichier ;
|
|
int n;
|
|
// assert (argc == 2);
|
|
if (argc != 2) {fprintf (stderr, "\nSyntaxe : %s <chaine> \n\n", argv[0]); exit (1); }
|
|
leFichier = fopen (argv[1], "w");
|
|
n = fwrite ("OK !\13\10\10\10\10", strlen ("OK !\13\10\10\10\10"), 1, leFichier);
|
|
fclose ( leFichier);
|
|
|
|
printf ("\nhello %s\n\n", argc);
|
|
printf ("\n\n\n Fin normale du programme\n\n");
|
|
}
|
|
|