Easy
What is the output of the following C code?
#include <stdio.h>
void swap(int *a, int *b) {
int temp = *a;
*a = *b;
*b = temp;
}
int main() {
int x = 5;
int y = 10;
swap(&x, &y);
printf("x: %d, y: %d\n", x, y);
return 0;
}
Author: Vincent CotroStatus: PublishedQuestion passed 263 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!
3
Find the sum of all even numbers in an array in C7
What is the size of a long long in C++?3
Write a C program that calculates the average of two notes.1
What does the following code refer to: C:\ProgramFiles\QtCreator\text.txt ? 2
Write a C program to calculate the total number of sweets.2
Include a .h library in C2
Undefined behavior.