Null pointer assignment problem

// -------------------------------- // -------------- ------------------ 
#include " stdio.h " 

int main () 
{ 
    int A [ . 4 ] = { 100 , . 5 , . 6 , 0 };
     int * P = NULL; // it does not point to any object, so there is no * p, * p can not immediately on assignment.
     // * p = 1;     
    the p-A =; // but he was a pointer can be assigned 
    * p = 1 ; // this time can be assigned to the * p. Note that the array a [0] value is modified. 
    return  0 ; 

}

 

 

 

Guess you like

Origin www.cnblogs.com/Stephen-Qin/p/11681676.html