I'm trying to set up a search for names in a code, so I'm doing a 2D array to store the names. however I'm not getting the desired output from doing this...
#include <stdio.h>
#include <string.h>
main ()
{
char name [4][20], string [20];
int count;
for (count = 0; count <3; count ++)
{
printf ("Enter your name \n ");
scanf ("%s", &string);
strcpy (name [count], string);
}
for (count = 0; count <3; count ++)
{
printf ("%s \n \n");
}
return 0;
}
printf ("%s \n \n");tries to exactly print the value of which variable, please?