Hey I am trying to understand pointers and I create a program in which I give words from keywords and I store them in an array and after that I want to print the first character of the first word (I expected) but it prints the first character of the second word
What is going wrong?
#include<stdio.h>
#include<stdlib.h>
int main ()
{
int i=0;
char array[5][10];
for(i = 0 ; i < 5 ; i++)
{
gets(array[i]);
}
printf("\n");
char *p;
p=&array[0][10];
printf("%c",*p);
return 0;
}