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 / saurav raj

#include<stdio.h>
#include<conio.h>

void main()
int a,b;
clrscr();
printf("Enter Two number a & b:- ");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("\nA=%d \t B=%d",a,b);
getch();

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why does this code crash?

1105


Explain what’s a signal? Explain what do I use signals for?

1169


Explain why C language is procedural?

1230


Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

1081


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

2106


Write a code on reverse string and its complexity.

1042


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

1138


Is Exception handling possible in c language?

2048


Is it fine to write void main () or main () in c?

1033


Should a function contain a return statement if it does not return a value?

1089


Can you think of a logic behind the game minesweeper.

2471


Explain what is the general form of a c program?

1099


What is scope rule in c?

1075


can we implement multi-threads in c.

1138


Explain how can I read and write comma-delimited text?

1177