C language pointer bit 1

Source: Internet
Author: User

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 = &num; 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.