What is the meaning of “wild pointer” in C?

前端 未结 11 1665
终归单人心
终归单人心 2020-11-30 04:14

Can anybody tell me, the meaning of wild pointer in C, how to obtain it and is this available in C++?

11条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-30 05:01

    Uninitialized pointer is called Wild Pointer. Suppose if you try

    int *p; //pointing to any random or unknown location. *p= 16; /Some unknown memory location is being corrupted.This should never be done./

    This can create a great threat to your program. B'Coz because they point to some arbitrary memory location and changing the content of that location may cause a program to crash or behave badly.

提交回复
热议问题