Reputation: 261
I have the initial pointer of the string how can read the value in character array from that string.
Upvotes: 0
Views: 71
Reputation: 22094
const char *str="A C string";
printf("The first character is %c\n",*str);
printf("The second character is %c\n",*(str+1));
Upvotes: 3