How to swap values between two variables without using a
third variable?
Answer Posted / vinodkumar
main()
{
int a=10,b=8;
void swap(a,b)
/*it does not return any value because return statement can
return only one value at a time*/
{
a=a+b;/*a=10+8,a=18*/
b=a-b;/*b=18-8,b=10*/
a=a-b;/*a=18-10,a=8*/
printf("after swaping a= %dand b=%d",&a,&b);
}
getch()
}
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
Can we write a method in JSP.If so how?
when will triggars the at new event in abap and web dybn pro?
could u please also write an example of a code that involves instances from an abstract class just as u did for interfaces because u said it could also work which i really doubt. thanks
what is an INI file?
What is the difference between DECISION COVERAGE(DC) and MODIFIED CONDITION/DECISION COVERAGE(MCDC)?
i am exeprienced person what is selection process
define profiler???
What is the use of sas software? Is sas and sap are different?
Can any one give an example (Source Code) on virtual function implemetation in Java?
Given a Binary Search Tree, write a program to print the kth smallest element without using any static/global variable. You can?t pass the value k to any function also.
how do find the user exit for selected feild whatis the process and can u plz explain it
Where do we need Operator overloading?
is it possible to desable particular parameter of the normal orcle report based on some condition ?????? if yes,wht is the function for desabling a parameter...
What is diffrent between Method and and function in c#
Tips for blog integration by www.esteemwebsolutions.com. Can Any body suggest me to how to make wonderful questions on web integration..