以下代码是C++中未定义的行为(虽然它几乎可以在任何广泛使用的实现上运行):
int* pointer; //uninitialized - likely illegal pointer value pointer++; //incrementing an illegal pointer is UB
以上代码在C中是否合法?
c c++ pointers
c ×1
c++ ×1
pointers ×1