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 / manas ranjan(gift)

#include<stdio.h>
void main()
{
int a,b;
printf("enter the numbers");
scanf("%d%d",&a,&b);
printf("before swaping the values are");
printf("a=%d,b=%d",a,b);
void swap(int,int);
swap(a,b);
}
void swap(int a,int b)
{
a=a+b;
b=a-b;
a=a-b;
printf("a=%d,b=%d",a,b);
}

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we need functions in c?

1014


Write a progarm to find the length of string using switch case?

2063


any "C" function by default returns an a) int value b) float value c) char value d) a & b

1080


Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.

2304


How can this be legal c?

1084


What is the explanation for modular programming?

1205


Once I have used freopen, how can I get the original stdout (or stdin) back?

1073


What is the heap?

1216


How can I remove the leading spaces from a string?

1155


Hai what is the different types of versions and their differences

1937


Why cant I open a file by its explicit path?

1027


Explain how can I convert a number to a string?

1150


What language is lisp written in?

1253


Can you assign a different address to an array tag?

1162


How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?

1026