#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 is ur strangth & weekness

1812


An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?

665


Give basis knowledge of web designing ...

1568


Which is better oop or procedural?

623


Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record

4737






What is sizeof c?

604


Tell us the use of fflush() function in c language?

631


What is the process to generate random numbers in c programming language?

604


What is the difference between void main and main in c?

618


What is build process in c?

641


What are operators in c?

575


What will be the outcome of the following conditional statement if the value of variable s is 10?

755


What is the scope of static variables in c language?

624


Is this program statement valid? INT = 10.50;

685


Why we use stdio h in c?

574