nope now whats wrong this was copied out of a book
this is getting beyond a jokeCode:int main() { int i;//, j, k; char *movies[3] = {"batman", "gone in 60 seconds", "get carter"}; for (i = 0; i < 3; i++) { printf("%s\n",*movies[i]); } }
coop
nope now whats wrong this was copied out of a book
this is getting beyond a jokeCode:int main() { int i;//, j, k; char *movies[3] = {"batman", "gone in 60 seconds", "get carter"}; for (i = 0; i < 3; i++) { printf("%s\n",*movies[i]); } }
coop
You've declared movies as an array of pointers to char:
And trying to print individual chars (printf expects a pointer due to "%s") -- line 11:Originally Posted by cooper1200
The correct printf() call should be:Originally Posted by cooper1200
Code:printf("%s\n", movies[i]);