Okay, I'm new at this and please if you don't want to help don't post. I need help with this array that I need to use to print a name. Here is what I have already. Any suggestions. I might be way off here but like I said I'm new. Thanks in advance.
What I need this for is for a sentence generator. It will have four arrays with eight words to use from the array. Tokens confuse me alot. I've read the section on arrays and strings in my text book but it does not elaborate using any method that I need for this to work.Code:#include <stdio.h>
main()
{ int n;
char nounone[8] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'};
nounone[0] = "Victor";
nounone[1] = "Anna";
nounone[2] = "Andrew";
nounone[3] = "Marty";
nounone[4] = "Lisa";
nounone[5] = "Tony";
nounone[6] = "Victor";
nounone[7] = "Victor";
printf("Pick a number between 1-8.\n");
scanf("%d\n", n);
printf("%d" nounone[n]);
getchar();
getchar();
}