#include <stdio.h>
static char *strings[] = {
"ae",
"ghi",
};
char **val = strings;
void print_val(void)
{
printf("%p\n", val);
printf("%s\n", val[0]);
return;
}
#include <stdio.h>
#include <errno.h>
extern char *val[];
extern void print_val(void);
int main(int argc, char *argv[], char *env[])
{
printf("%p\n", val);
printf("%s\n", *(char **)((void **)val)[0]);
print_val();
return 0;
}
你能看出其中的原理吗?