#define swap1(a,b) a=a+b;b=a-b;a=a-b;
main()
{
int x=5,y=10;
swap1(x,y);
printf("%d %d\n",x,y);
swap2(x,y);
printf("%d %d\n",x,y);
}

int swap2(int a,int b)
{
int temp;
temp=a;
b=a;
a=temp;
return;
}

what are the outputs?

Answer Posted / goodhunter

10 5
10 5

Is This Answer Correct ?    20 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c still used?

604


I need previous papers of CSC.......plz help out by posting them.......

1818


What is the use of a static variable in c?

595


Explain the use of 'auto' keyword

679


Can we assign string to char pointer?

589






Explain the difference between strcpy() and memcpy() function?

596


How do you list a file’s date and time?

636


How would you obtain the current time and difference between two times?

731


console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above

657


What are called c variables?

575


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

771


What are the uses of null pointers?

591


What are 'near' and 'far' pointers?

620


Explain function?

665


Difference between MAC vs. IP Addressing

643