Home
Sitemap
Comment policy
TIPSZON
Home
Computer Science
Placement Guidance
GATE-CSE
Amazon-CSA
Privacy Policy
Disclaimer
Terms and Condition
About
Home
Technology
C program to swap two numbers without using third variable
C program to swap two numbers without using third variable
by
Shivam verma
May 20, 2021
#include<stdio.h>
int main()
{
int a = 10;
int b = 20;
printf("Before swap a=%d b=%d\n",a,b);
a = a+b;
b = a-b;
a = a-b;
printf("\nAfter swap a=%d b=%d\n",a,b);
return 0;
}
Post a Comment
0 Comments
Social Plugin
Categories
Amazon Cloud Support Associate
5
Android
4
Blogging
9
Blogspot
8
C-Programs
11
computer basics
5
Computer science
32
Computer tricks
7
Courses
2
Data structures
1
GATE
3
GATE-Computer Networks
1
How to
5
Life tips
24
Motivation
11
Personality development
24
Placement Guidance
6
Programming
19
Python Programming
4
Python Programs
1
Python-NumPy
2
Study Material
3
Study tips
15
Technology
27
Web Development
4
What IS
1
0 Comments