21 May, 2022
Write a C program to swap two numbers without using a temporary variable.
#include
int main()
{
int num1=10,num2=20;
num1=num1+num2;
num2=num1-num2;
num1=num1-num2;
printf("After swap two numbers
");
printf("num1=%d , num2=%d ",num1,num2);
return 0;
}
WorldTimeTech provides Top News,Education, Health Tips, Lifestyle, Science and Technology, Computer Help Tips and Unknown facts and also more and more. We Always Try to Give You Helpful Content to you. Thank You...
Copyright © 2025 WorldTimeTech.com. All Rights Reserved.