Swap Two Numbers without Third Variable

Problem Statement:

Program to swap two numbers without using temporary variable and arithmetic operators.

Source Code:
#include<stdio.h>
int main(){
    int num1, num2;
    scanf("%d",&num1);
    scanf("%d",&num2);
    num1 = num1^num2;
    num2 = num1^num2;
    num1 = num1^num2;
    printf("%d %d",num1,num2);
    return 0;
}
SAMPLE INPUT:
9
7
SAMPLE OUTPUT:
7 9