C基础--指针与函数的参数

#include <stdio.h>

void funcA(int *p_int_a, int int_b)
{
    *p_int_a = 100;
    int_b = 200;
    printf("funcA: *p_int_a = %d, int_b = %d \n", *p_int_a, int_b);

    printf("funcA: p_int_a = %d, &p_int_a = %d, *p_int_a = %d \n", p_int_a, &p_int_a, *p_int_a);
}

int main(int argc, char* argv[])
{
    int a, b;
    a = 20;
    b = 30;
    printf("main: a = %d, b = %d \n", a, b);

    funcA(&a, b);

    printf("main: a = %d, b = %d \n", a, b);
    printf("main: &a = %d \n", &a);
    system("pause");
    return 0;
}

 

posted @ 2015-09-22 09:38  微博和csdn还有你  阅读(128)  评论(0编辑  收藏  举报