gpt4 book ai didi

c - 是否可以找出变量名,指向的指针?

转载 作者:太空宇宙 更新时间:2023-11-04 05:11:04 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Is it possible to find out the variable name, the pointer pointing to?

是否也可以得到指针指向的数组名?

例子:

 char name[20];
char *p=name
int door_no;
int *q= & door_no

在上面的示例中,我们给出了数组的基地址,其中包含数组名称和指向 door_no 的指针 q,但是如果我还必须知道数组指向的变量的名称怎么办?变量名指针 q 也指向什么?有没有可能我做了尝试,我得出的结论是不可能,但我仍在努力寻找解决方案。伙计们,你们怎么看?有什么办法可以实现吗?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com