C language example exchange two variables

C language example exchange two variables
refe‮ r‬to:lautturi.com
/*
swap two variables in C language
*/

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main()
{
    int x = 12, y = 34, temp;
    temp = x;
    x = y;
    y = temp;
    printf("X = %d and Y = %d", x, y);

    return 0;
}
Created Time:2017-08-29 12:48:31  Author:lautturi