I'm learning C for fun and I'm trying to make a program that creates a array of strings. I'm trying this right now:
char str[2][10];
strcpy(str[0], "foo");
strcpy(str[1], "bar");
printf("%d \n",str[0]);
printf("%d \n",str[1]);
But my printf returns only some numbers, and I would like it to display foo and bar. I've been reading about and I think that it is displaying a pointer to my strings. What am I doing wrong?
printfand format string documentation.chararray. (I adjusted the title accordingly)