logo

What are double pointers in C?

#include <stdio.h> #include <stdlib.h> #include <string.h> void display(char********* output) { printf("%s\n", *output); } int main(int argc, char* argv[]) { char* str = "This is a test"; char** str2 = &str; char*** str3 = &str2; char**** str4 = &str3; char***** str5 = &str4; char****** str6 = &str5; char******* str7 = &str6; char******** str8 = &str7; char********* str9 = &str8; display(str9); return 0; }
Course thumb

The C programming language made simple