#include <stdio.h>

int cv(/*값*/ int y)           //Call-by-Value
{
    y=y*y;
    return y;
}

void cr(/*주소값*/ int * a)    //Call-by-Reference
{
    *a=(*a)*(*a);
}

int main() {
    int n;
    scanf("%d", &n);

    printf("%d\n",cv(n));

    cr(&n);
    printf("%d\n", n);
    
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: