1#include <stdio.h>2#include <stdlib.h>3 4 voidMain ()5 {6 int*p = NULL;//The pointer starts preferably initialized to null7 if(p = =NULL)8 {9printf"Sister P is now single can be a crazy offense");Ten}Else One { Aprintf"sister P is not single please think carefully"); - } - //printf ("%d", *p);//illegal 0x000000 operating system use can not play casually the - GetChar (); -}
1#include <stdio.h>2#include <stdlib.h>3 4 voidmain1 ()5 {6 intnum = -;7 int*p;//the error uses an uninitialized local variable8 //in some C + + compilers do not check the initialization of variables, pointers must be initialized before use9 //p = num;//relative to the 100 address given P can compile cannot runTenp = # Oneprintf"%d",*p); Aprintf"%x",&p); - - the GetChar (); -}
1#include <stdio.h>2#include <stdlib.h>3 4 voidmain4 ()5 {6 DoubleA =1, b=2, c=3;//Double8 bytes7 //double *pa,pb,pc;//Pointer four bytes PA is pointer8 Double*pa,*pb,*pc;9printf"%d%d%d",sizeof(PA),sizeof(PB),sizeof(PC));Ten}
C language pointer bit 1