I was practicing about structs in C, so I've tried to execute 2 times this code and twice the computer crashes. I've had turn off the computer twice since my computer crashes.
Compiler is GCC (About MinGW on windows platform). The code is following :
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct person {
char name[50];
int age;
int document;
};
int main(void){
struct person p1;
printf("Data of the first person\n\n");
printf("age: ");
fflush (stdin);
scanf("%i",p1.age );
printf("Document: ");
fflush(stdin);
scanf("%i",p1.document);
printf("Age is: %i and document is: %i ",p1.age,p1.document);
return 0;
}
Sincerely, NIN.
UPDATE....
Bad news. Now Avast says I`ve created a virus. Therefore Avast delete my exe:
Should I report as false positive or not ?