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 / sams

Two numbers are input through the keyboard into two
locations C and D. Write a program to interchange the
contents of C and D.



#include<stdio.h>

#include<conio.h>
void main( )
{
int a,b,c;
clrscr( );
printf("Enter A: ");
scanf("%d",&a);

printf("Enter B: ");
scanf("%d",&b);

c=a;
a=b;
b=c;

printf("\n The New Value Of A is : %d",a);
printf("\n The New Value Of B is : %d",b);


getch();
}

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by type casting?

1056


What is difference between stdio h and conio h?

1384


What is string function c?

1034


how we can make 3d venturing graphics on outer interface

4835


In which layer of the network datastructure format change is done

1891


can we change the default calling convention in c if yes than how.........?

2537


What is a built-in function in C?

1608


How are Structure passing and returning implemented by the complier?

1171


What is logical error?

1128


swap 2 numbers without using third variable?

1138


What is atoi and atof in c?

1088


Explain the array representation of a binary tree in C.

1234


Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff

3298


What does char * * argv mean in c?

1070


hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..

1925