#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
Why is c so powerful?
What is the argument of a function in c?
What is function pointer c?
Why structure is used in c?
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
Is null always equal to 0(zero)?
How do I swap bytes?
Can we compile a program without main() function?
string reverse using recursion
hi any body pls give me company name interview conduct "c" language only
What is the difference between struct and typedef struct in c?
How can I read in an object file and jump to locations in it?
What is a node in c?
Difference between Shallow copy and Deep copy?
What are data structures in c and how to use them?