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 266 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!
7
What is the size of a long long in C++?3
Write a C program that calculates the average of two notes.2
Write a C program to calculate the total number of sweets.3
Undefined behavior.2
Include a .h library in C3
Find the sum of all even numbers in an array in C1
What does the following code refer to: C:\ProgramFiles\QtCreator\text.txt ?