call by value in C

#include

/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int add1 (int x,int y,int z);
int add2 (int x,int y,int z);

int main(int argc, char** argv) {
    int a,b,c,z;
    int aa[1],bb[1],cc[1],zz[1];
    aa[0]=bb[0]=cc[0]=4;
    a=b=c=3;
    z=add1(a,b,c);
    printf("add=%d\n",z);
    return 0;
}


int add1 (int x,int y,int z) {
    int p;
    p=x+y+z;
    return p;
}


留言

這個網誌中的熱門文章

隱藏檔案 及 將已註冊完的軟體取消註冊

notepad++ for procomm plus

ARP