LogiQuest
Back to Functions
2

What will be the output of the program?

#include <stdio.h>
void swap(int a, int b) { int t = a; a = b; b = t; }
int main(void) {
    int x = 1, y = 2;
    swap(x, y);
    printf("%d %d\n", x, y);
    return 0;
}
Medium

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.