#include
#include
#include
struct a{
char ad[100];
char soyad[100];
int no;
};
int sira(int a, struct a *c);
main()
{
struct a b[100];
struct a *c;
int x=0;
int ch;
int y=0;
c=b;
printf("HELLO !!");
printf("\nMake your choice");
printf("\n1-Add new student");
printf("\n2-List all student");
printf("\n3-Exit");
printf("\nYour choice = ");
scanf("%d",&ch);
while(ch<1 || ch>3)
{
printf("\nYour wish cannot be possible");
printf("\nPlease make your choice again = ");
scanf("%d",&ch);
}
while(1)
{
switch(ch)
{
case 1:
printf("\nPlease enter for %d. student",x+1);
printf("\nName = ");
scanf("%s",b[x].ad);
printf("\nSurname = ");
scanf("%s",b[x].soyad);
printf("\nNo = ");
scanf("%d",&b[x].no);
printf("\nMake your choice");
printf("\n1-Add new student");
printf("\n2-List all student");
printf("\n3-Exit");
printf("\nPlease make your choice again = ");
scanf("%d",&ch);
while(ch<1 || ch>3)
{
printf("\nYour wish cannot be possible");
printf("\nPlease make your choice again = ");
scanf("%d",&ch);
}
x++;
break;
case 2:
int sira(int x, struct a *c);
break;
case 3:
printf("\nHave a nice day !!");
exit(0);
break;
}
}


getch();
return 0;
}
int sira(int x, struct a *c)
{
int y=0;
for(y=0;y {
printf("\n%d. student\t Name = %s\t Surname = %s\t No = %d",y+1,(*c).ad,(*c).soyad,(*c).no);
}
}


hatamın nerde olduğunu bulamadım, dev c'de hata bulamıyo, ama çalıştırmıyo da