📜  什么是按值调用和按引用调用 - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:08.110000             🧑  作者: Mango

代码示例1
/* function definition to swap the values */
void swap(int *x, int *y) {

   int temp;
   temp = *x;    /* save the value at address x */
   *x = *y;      /* put y into x */
   *y = temp;    /* put temp into y */
  
   return;
}