Add sos crash

This commit is contained in:
flyingscorpio@pinebookpro 2021-11-15 10:39:59 +01:00
parent f345891be9
commit 6a96eb957c
2 changed files with 17 additions and 0 deletions

1
.gitignore vendored
View file

@ -36,3 +36,4 @@ strcmp
strlen
adresses-variables
pointeurs
sos-crash

View file

@ -0,0 +1,16 @@
/* SOS crash */
#include <stdio.h>
#include <stdlib.h>
int main() {
int age = 23;
int *pointeur_age = &age;
printf("Quel est votre âge ? ");
scanf("%d", pointeur_age);
printf("Vous avez %d ans\n", age);
return 0;
}