Anyone please help me to find out ...where is the error because this program will continue untill the user enter 0 the program will terminate ...but i stuck at here please help...
#include<stdio.h>
struct student{
int id_no;
char name;
int average;
int main()
{
struct student stud1;
do{
printf("Enter Index No : ");
scanf("%d",&stud1.id_no);
printf("Enter name : ");
scanf("%s",&stud1.name);
printf("Enter average : ");
scanf("%d",&stud1.average);
printf("\n");
}while(stud1.id_no!=0);
return 0;
}