单选题
C语言
2008-03-20
以下程序段中,能够通过调用函数fun,使main函数中的指针变量p指向一个合法的整型单元的是( )
A.main()
B.main
{ int *p; { int *p;
fun(p); fun( &p);
}
}
int fun(int *p) int fun(int **p)
{ int s; p= &s;} { int s;*p=&s;}
{ int *p; { int *p;
fun(p); fun( &p);
}
}
int fun(int *p) int fun(int **p)
{ int s; p= &s;} { int s;*p=&s;}
C.#include
D.#include
main() main()
{ int *p; { int *p;
fun( &p); fun(p);
} }
int fun(int **p) int fun(int *p)
{ *p=(int *)malloc(2);} { p=(int *)malloc(sizeo(int));}
main() main()
{ int *p; { int *p;
fun( &p); fun(p);
} }
int fun(int **p) int fun(int *p)
{ *p=(int *)malloc(2);} { p=(int *)malloc(sizeo(int));}
参考答案
C
答案解析
暂无解析
你可能感兴趣的试题
A.typedef STP char *s;
B.typedef *char STP;
C.typedef stp *char;
D.typedef char* STP;
A.scanf( "%d",&(*p).age);
B.scanf( "%s",&stname);
C.scanf( "%c",&std[0].sex)
D.scanf( "%c",&(p->sex));