The problem of pointer definition in C language

dyb6918 注册会员
2023-02-27 17:35

does not define and p as a whole. You can think of int as a data type -- the data type of an integer pointer. Whether it's int* or int p=& a, the fact that one is empty does not mean that p is a whole.

Hope to adopt!

e4qqqq 注册会员
2023-02-27 17:35
  • This is a problem in writing, the pointer type definition can be as follows:
int * a;
int* b;
int *c; 
  • *
*a = 1;
du_bc1984 注册会员
2023-02-27 17:35

int *p当一个整体时,是定义一个变量,该小虚竹 变量是一个指针类型;

gyh33900 注册会员
2023-02-27 17:35

Both int* p and int* p are valid, but int* p is misleading. In this case, the type of p1 is int , and the type of p2 is int. However, since and int are written together, it is easy to misunderstand that the type of p2 is also int*. By writing int* p1, p2 will not be misunderstood.