#include <stdio.h>
struct stack{
int n,,a[100];
}s;
int main()
{ int i;
scanf("%d",&s.n );
printf("%d",s.n );
for(i=0;i<3;i++ )
{
scanf("%d",&s.a[i]);
printf("%d",s.a[i]);
}
return 0;
}
this program is not running why can't i access elements in this way directly.
struct stack{
int n,,a[100];
}s;
int main()
{ int i;
scanf("%d",&s.n );
printf("%d",s.n );
for(i=0;i<3;i++ )
{
scanf("%d",&s.a[i]);
printf("%d",s.a[i]);
}
return 0;
}
this program is not running why can't i access elements in this way directly.
Comment