Your
sprintf()
calls are outside of any function. You have to move them into a function (using
main()
here):
int main()
{
sprintf(men[0].n[0],"hello1");
sprintf(men[1].n[1],"hello2");
sprintf(men[2].n[2],"hello3");
printf(" %s",men[1].n[1]);
return 0;
}