#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 / chitra

10 5
5 5

Is This Answer Correct ?    3 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?

1666


Is null a keyword in c?

737


What are pointers? What are different types of pointers?

632


What are the rules for identifiers in c?

589


Explain what does a function declared as pascal do differently?

642






What are keywords in c with examples?

605


Explain the difference between getch() and getche() in c?

565


What are compound statements?

630


What is difference between static and global variable in c?

540


What is new line escape sequence?

811


Explain how can a program be made to print the line number where an error occurs?

694


How can I find the modification date of a file?

706


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

670


Write a program to print all permutations of a given string.

644


Is fortran faster than c?

585