Hi,
I am looking help in my code. My code supposed to store six name of student's and print the each student names
I have written following code
When I run this code on my PC It gives following output
Enter name:
gajya
kamlesh
padmya
sujit
anil
'sunil' is not recognized as an internal or external command,
operable program or batch file.
someone can help me in my code. Why the name of student's are not printing on the screen?
I am looking help in my code. My code supposed to store six name of student's and print the each student names
I have written following code
Code:
// language c and GCC
#include <stdio.h>
int main()
{
char name[6];
int i, j;
printf("Enter name: \n");
for (i = 0; i <5; i++)
{
scanf("%s", name);
}
for (j = 0; j <6; j++)
{
printf("Your name is %s. \n", name[j]);
}
return 0;
}
Enter name:
gajya
kamlesh
padmya
sujit
anil
'sunil' is not recognized as an internal or external command,
operable program or batch file.
someone can help me in my code. Why the name of student's are not printing on the screen?