相关疑难解决方法(0)

在C中使用合法的无效指针值?

以下代码是C++中未定义的行为(虽然它几乎可以在任何广泛使用的实现上运行):

int* pointer; //uninitialized - likely illegal pointer value
pointer++; //incrementing an illegal pointer is UB
Run Code Online (Sandbox Code Playgroud)

以上代码在C中是否合法?

c c++ pointers

2
推荐指数
1
解决办法
475
查看次数

标签 统计

c ×1

c++ ×1

pointers ×1