Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program to swap Two numbers without using temp variable.

Answer Posted / biren

#include<stdio.h>
void main()
{
int a=2,b=3;
printf("before swap the value is:::");
printf("a=%d\tb=%d",a,b);
b=a+b-(a=b);
printf("after swap the value is:::");
printf("a=%d\tb=%d",a,b);
}

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a code to remove duplicates in a string.

984


What does emoji p mean?

1046


With the help of using classes, write a program to add two numbers.

983


How to find a missed value, if you want to store 100 values in a 99 sized array?

1364


Explain the properties of union.

1019


Is null always defined as 0(zero)?

1042


What is the difference between abs() and fabs() functions?

1060


What are variables and it what way is it different from constants?

1191


while initialization of array why we use a[][2] why not a[2][]...?

2303


Is fortran still used in 2018?

986


Tell me with an example the self-referential structure?

941


What is %g in c?

1020


What is the value of h?

988


Why is a semicolon (;) put at the end of every program statement?

1030


Write a program to check whether a number is prime or not using c?

1009