#define INT_PTR int* 这是宏定义,编译预处理阶段要进行宏替换,INT_PTR a,b会变成 int* a,b 所以b不是指针类型
typedef int* int_ptr; 这是自定义类型,也就是把int_ptr定义为 int型指针,编译阶段会把c,d都识别为指针
test.c文件中包括如下语句:
1
2
3
4
|
#define INT_PTR
int
*
typedef
int
* int_ptr;
INT_PTR a,b;
int_ptr c,d;
|
文件中定义的四个变量中,哪个变量类型不是指针类型?
正确答案: B 你的答案: B D (错误)
a
b
c
d