printf("\nInsert name : ");
scanf("%s", &temp);
strcpy(data[i].name, temp);
printf("Insert lastname : ");
scanf("%s", &temp);
strcpy(data[i].last_name, temp);
you don't need the & when you are scanning into arrays, you might want to start looking into fgets http://faq.cprogramming.com/cgi-bin/...&id=1043284385
Then you might want to look into linked list .
BTW, what does this have to do with qsor?