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...

a C prog to swap 2 no.s without using variables just an
array?

Answer Posted / baidyanath bisoyi

void main()
{
int a,b;
printf("enter the two numbers\n");
scanf("%d%d",&a,&b);
printf("a=%d\n b=%d\n",a,b);
a=a+b-(b=a);
printf("a=%d\n b=%d\n",a,b);
getch();
}

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are data structures in c and how to use them?

1094


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

2638


What does 3 mean in texting?

1029


Which programming language is best for getting job 2020?

985


How reliable are floating-point comparisons?

1034


Is exit(status) truly equivalent to returning the same status from main?

1008


What does void main return?

1070


What is the use of static variable in c?

1044


Can a pointer be null?

975


Is it cc or c in a letter?

960


What are preprocessor directives in c?

1033


How can you find the exact size of a data type in c?

952


What is getch () for?

1149


Explain what is the heap?

1014


how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

1920