Pointers to Pointers
A pointer can point to another pointer. Used for arrays of strings and to modify a pointer in a function.
Example
#include <stdio.h>
int main(void) {
char *names[] = {"Ada", "Kofi"};
char **pp = names;
printf("%s %s\n", *pp, *(pp + 1));
return 0;
}Result
Ada Kofi
Exercise
Array of strings.
char *names[] = {"a"}; char pp = names;
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.