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 / jaspreet singh

void main()
{
int a[2]={20,10};
a[0]=a[0]^a[1];
a[1]=a[0]^a[1];
a[0]=a[0]^a[1];
printf("a=%d,b=%d",a[0],a[1])
getch();
}

Is This Answer Correct ?    7 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what are header files and explain what are its uses in c programming?

1151


Can you apply link and association interchangeably?

1123


Explain what is operator promotion?

1084


What is a program flowchart and explain how does it help in writing a program?

1304


PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE

2019


write a program to copy the string using switch case?

2894


What is 2 d array in c?

1020


What are runtime error?

1128


What is the concatenation operator?

1147


i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical

2321


In C, What is the #line used for?

2197


What is include directive in c?

1152


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

1118


Explain the properties of union. What is the size of a union variable

1184


Write a program to print "hello world" without using a semicolon?

1055