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 / manish soni tagore collage jai

my dear frd....
here some hapen.
#define swap(a,b) temp=a;a=b;b=temp;----------(1)
is was as function of swap two no;(but it is differnt frm
funtion.)
so
at i>j;
enter swap(i,j);
so jump at eq(n) ---(1) and call swap function'
and


temp=5;


i=10;
j=0;

you see three variable.
but it printf i,j to convert swap.
bcoz it have two arguments.
and print temp=0;
becoz temp have 0;

Is This Answer Correct ?    0 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are types of functions?

975


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

1076


what do you mean by enumeration constant?

957


What is typedef example?

1112


How can I handle floating-point exceptions gracefully?

1108


Explain how can I write functions that take a variable number of arguments?

1028


Is calloc better than malloc?

974


What are the 4 types of functions?

995


the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above

989


Write a program to swap two numbers without using the third variable?

1016


How can variables be characterized?

2129


What is difference between function overloading and operator overloading?

1046


Is c language still used?

933


Tell me when is a void pointer used?

1102


What is extern c used for?

999