c - 指向指向 const char 的指针的地址的数据类型

标签 c pointers types

我有一个非常简单的问题:

const char *y = "string_test";
x = &y;

x 是什么类型?

预先感谢您的回答!

最佳答案

假设你的问题有错字,代码是:

const char *y = "string_test";
x = &y;

x 应定义为:

const char** x; // x is a pointer(Address of) a pointer to a constant char/string

关于c - 指向指向 const char 的指针的地址的数据类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59031247/

相关文章:

c++ - 模板函数如何根据类型在编译时修改它的行为?

c# - 将类型对象动态转换为类型(某些类)

c - string3.h中__warn_memset_zero_len的定义在哪里

c - 如何在指针上正确使用 malloc?

c++ - 在 C++ 中循环遍历数组时的额外数字

.Net 字典散列对象类型键

c++ - 模板偏特化和从属名称

c - 逐行读取文件并将逗号分隔的每个字符扫描到C中的单独变量中

c++ - ecCodes(grib阅读库)不释放内存

c - 初始化结构数组