"depot M311"
This commit is contained in:
18
S3T_TP_00_REVISIONS/crash.c
Executable file
18
S3T_TP_00_REVISIONS/crash.c
Executable file
@@ -0,0 +1,18 @@
|
||||
#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");
|
||||
}
|
||||
|
Reference in New Issue
Block a user