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 interchange two variables without using
the third variable?

Answer Posted / mahendra giri

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter two no");
scanf("%d%d",&a,&b);
c=a+b;
b=a-b;
a=a-b;
printf("After chanching no is =\n");
printf("a=%d b=%d",a,b);
getch();
}

Is This Answer Correct ?    23 Yes 44 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write the syntax and purpose of a switch statement in C.

1039


pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)

2579


What is time null in c?

1005


Do you know the use of 'auto' keyword?

1129


What is %lu in c?

1180


Explain what is the difference between text files and binary files?

1096


Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

1095


how many key words availabel in c a) 28 b) 31 c) 32

1011


What is new line escape sequence?

1265


Explain c preprocessor?

1045


write a program fibonacci series and palindrome program in c

978


How to write a multi-statement macro?

989


How is a null pointer different from a dangling pointer?

974


What is chain pointer in c?

1007


How can you restore a redirected standard stream?

1055