指標
#include <stdio.h>
int main() {
int *d;
printf("%p\n", &d);
printf("%p\n", d);
printf("%d", *d);
}gcc test.c && ./a.out回傳指標的function
int* test(int as)
{
static int a;
return &a;
}Last updated
#include <stdio.h>
int main() {
int *d;
printf("%p\n", &d);
printf("%p\n", d);
printf("%d", *d);
}gcc test.c && ./a.outint* test(int as)
{
static int a;
return &a;
}Last updated