This will display the character f. Now how would I display the first character of "the second" array of characters? I tried this but the program won't compileCode:#include <stdio.h> int main(void) { char *text[] = {"foo", "bar"}; printf("%c\n", (*text)[0]); return 0; }
Thanks.Code:#include <stdio.h> int main(void) { char *text[] = {"foo", "bar"}; printf("%c\n", (*++text)[0]); return 0; }