指標
#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
Was this helpful?