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

#include<stdio.h>
#include<conio.h>
# define swap(a,b) temp=a; a=b; b=temp;
void main( )
{
int i, j, temp;
i=5;
j=10;
temp=0;
if( i > j)
swap( i, j );
printf( "%d %d %d", i, j, temp);
}

Answer Posted / harish

it enters into swap function only when i>j.

but i contains 5 and j contains 10.

can u plz explain this

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is c so powerful?

1067


What is the argument of a function in c?

995


What is function pointer c?

1037


Why structure is used in c?

1116


How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same

1056


Is null always equal to 0(zero)?

993


How do I swap bytes?

1025


Can we compile a program without main() function?

1080


string reverse using recursion

2376


hi any body pls give me company name interview conduct "c" language only

2231


What is the difference between struct and typedef struct in c?

1087


How can I read in an object file and jump to locations in it?

991


What is a node in c?

921


Difference between Shallow copy and Deep copy?

1971


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

1097