首页 > 试题广场 >

在以下C代码中,输出结果是什么? #include std

[单选题]
在以下C代码中,输出结果是什么?
#include <stdio.h>

void swap(int *a, int *b) {
    int temp = *a;
    *a = *b;
    *b = temp;
}

int main() {
    int a = 5, b = 10;
    swap(&a, &b);
    printf("%d %d", a, b);
    return 0;
}


  • 5 10
  • 10 5
  • 0 0
  • 15 5

这道题你会答吗?花几分钟告诉大家答案吧!