#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
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
How to delete a node from linked list w/o using collectons?
Is there any possibility to create customized header file with c programming language?
what is different between auto and local static? why should we use local static?
What are # preprocessor operator in c?
Can you define which header file to include at compile time?
Explain the use of fflush() function?
write a program to copy the string using switch case?
Which is best linux os?
Why c is called a mid level programming language?
How can I split up a string into whitespace-separated fields?
What is difference between structure and union in c?
Explain what is #line used for?
What is the purpose of macro in C language?
How can I recover the file name given an open stream or file descriptor?