Welcome Guest | Sign in | Register
Functions - Discussion Page For Q.10766 | C Programming Questions and Answers | C Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Functions > Questions and Answers

Q: What will be printed as the result of the operation below?
#define swap(a,b) a=a+b;b=a-b;a=a-b;
void main()
{
int x=5, y=10;
swap (x,y);
printf("%d %d",x,y);
swap2(x,y);
printf("%d %d",x,y);
}
int swap2(int a, int b)
{
int temp;
temp=a;
b=a;
a=temp;
return 0;
}  
A. 5,10 B. 10,5
C. 0,5 D. 10,0

Answer and Explanation

Answer:10,5

Explanation:
There is no explanation...

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.