Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

C Programming to swap two variables

#include <stdio.h>

int main()
{
    int x = 20, y = 30, temp;
    temp = x;
    x = y;
    y = temp;
    printf("X = %d and Y = %d", x, y);
    
    return 0;
}
Source by devsenv.com #
 
PREVIOUS NEXT
Tagged: #C #Programming #swap #variables
ADD COMMENT
Topic
Name
6+3 =