I am writing simple array program.
#include<stdio.h>
struct Student
{
int i; //Stores address of integer Variable
char *name; //Stores address of Character String
};
int main()
{
struct student s1[] ={
{1,"srini"},
{2,"pankaj"},
{3,"rajini"}
};
printf("\nRoll Number of Student : %d",s1.i);
printf("\nName of Student : %s",s1.name[0]);
return(0);
}
Showing error as error: array type has incomplete element type
I dont know what I am doing wrong