Here is the C code.
#include <stdio.h>
#include <conio.h>
main()
{
int i,n;
char a[100];
printf("Enter number of teams");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
printf("\nenter team %d",i);
scanf("%s",a);
}
for(i=1;i<=n;i++)
{
printf("%s",a[i]);
}
}
My program is simple, but its crashing. i just want to load in a few names into array and then print them back. I am able to do that but at last line, its crashing.