How To Write a C Program To Swap Of Two No’s Without Using Third Variable in C Programming Language ?
Solution For C Program To Swap Of Two No’s Without Using Third Variable:
#include<stdio.h> #include<conio.h> void main() { int a,b; clrscr(); printf("Enter value for num1 & num2 : "); scanf("%d %d",&a,&b); a=a+b; b=a-b; a=a-b; printf("After swapping value of a : %d",a); printf("After swapping value of b : %d",b); getch(); }Output :Enter value for num1 & num2 : 10 20 After swapping value of a : 20 After swapping value of b : 10
Tags: C Program To Swap Of Two No’s Without Using Third Variable, c program to swap two numbers without using third variable, c program to swap two numbers without using third variable using functions, program to swap two numbers without using third variable in c language, write a program to swap two numbers without using third variable in c#, program to swap two numbers without using third variable in php, program to swap two numbers without using third variable in java, c program to swap two numbers without using temporary variable, c program to swap two numbers using pointers.
Learn More :
C Program
- Using Bash to input stuff into c program
- Difficult C Programming Questions
- Write a c program to find largest among three numbers using binary minus operator three numbers using binary minus operator
- PRINTING ASCII VALUE USING C PROGRAM
- MULTIPLICATION OF TWO MATRICES USING C PROGRAM
- FIND OUT SUM OF DIAGONAL ELEMENTS OF A MATRIX USING
- Write A C Program To Find Out Transport Of A Matrix
- Factorial of 100 in C Program
- Multiplication of large numbers in c
- Division of Large Numbers in C Program
- BINARY SEARCH USING C PROGRAM
- BINARY SEARCH THROUGH RECURSION USING C PROGRAM
- FIND FACTORIAL OF A NUMBER USING RECURSION IN C PROGRAM
- FIND GCD OF A NUMBER USING RECURSION IN C PROGRAM
- FIND SUM OF DIGITS OF A NUMBER USING RECURSION USING C PROGRAM
- FIND POWER OF A NUMBER USING RECURSION USING C PROGRAM
- REVERSE A NUMBER USING RECURSION IN C PROGRAM
- SWAP TWO VARIABLES WITHOUT USING THIRD USING C PROGRAM VARIABLE
- Write A C Program For Swapping Of Two Arrays
- SWAPPING OF STRINGS USING C PROGRAM
- CONVERSION FROM DECIMAL TO OCTAL USING C PROGRAM
- CONVERSION FROM DECIMAL TO OCTAL USING C PROGRAM
- CONVERSION OF DECIMAL TO BINARY USING C PROGRAM
- CONVERSION OF FAHRENHEIT TO CENTIGRADE USING C PROGRAM
- C or C++ Program To Find Bonus Amount