c语言中指针

c语言中指针

1、

#include <stdio.h>

int main(void)
{
    int a = 100;
    int b = 200;
    int c = 300;
    
    int *x, *y;
    
    x = &a;
    y = &c;
    
    printf("xxxx:    %d\n", *x);
    printf("yyyy:    %d\n", *y);
    putchar('\n');
    
    x = &b;
    *y = 500;
    
    printf("aaaa:   %d\n", a);
    printf("bbbb:   %d\n", b);
    printf("cccc:   %d\n", c);
    printf("xxxx:   %d\n", *x);
    printf("yyyy:   %d\n", *y);
    
    return 0;
}

c语言中指针

 

上一篇:JPA EnableJpaAuditing 审计功能


下一篇:坑爹的日志无法按天切割问题!