Mode Gelap

Recent in Fashion

Best Seller Books

1219110042 Operator Overloading Swap without third variable - cpp program

Write a program to swap value of two variables without using third variable

5

3
3
sample program:
#include <iostream>
using namespace std;
int main()
{
  int a,b;
  cin>>a>>b;
  a=a+b;
  b=a-b;
  a=a-b;
  cout<<a<<" "<<b;
	return 0;
} 

Subscribe Our Newsletter

avatar
"By speaking behind my back, it means that you respect my existence enough not to act in front of my face."

Related Posts

0 Comment

Post a Comment

Article Top Ads

Parallax Ads

Article Center Ads

Article Bottom Ads