C语言基础:多重指针代码演示
#include <stdio.h> int what_is_the_value(int ***ptr) { return(***ptr); } int main(void) { int *level_1, **level_2, ***level_3, value = 1001; level_1 = level_2 = level_3 = printf("The value is %d\n", what_is_the_value(level_3)); return 1; }
输出结果:
The value is 1001