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

How to write the code of the program to swap two numbers
with in one statement?

Answer Posted / rajitha

#include<stdio.h>
main()
{
int a=3,b=4;
b=a+b-(a=b);
printf("%d",a);
printf("%d",b);
}

Is This Answer Correct ?    19 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are valid operations on pointers?

1203


What are c identifiers?

1097


What is an auto keyword in c?

1099


How do you redirect a standard stream?

1110


How can I access an I o board directly?

1093


Do you know the purpose of 'register' keyword?

1023


Who developed c language and when?

1071


Explain how can I read and write comma-delimited text?

1175


What is null in c?

1096


Why is c called a mid-level programming language?

1210


Why do we use header files in c?

1079


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

2647


What is an lvalue in c?

1129


which type of aspect you want from the student.

2167


Who is the main contributor in designing the c language after dennis ritchie?

1009