This article shows how to swap two numbers. Source code: #include<stdio.h> void swap(int,int); int main() { int num1,num2; printf(“enter the numbers\n”); scanf(“%d%d”,&num1,&num2); swapWithTemp(num1,num2); swapWithoutTemp_1(num1, num2); swapWithoutTemp_2(num1, num2); swapWithoutTemp_3(num1, num2); return 0; } void swapWithTemp(int num1,int num) { int temp = num1; num1 = num2; num2 = temp; printf(“after swapping num1 = %d and num2 = […]

Read More