On Tue, Aug 5, 2008 at 1:43 PM, radha krishnan <[EMAIL PROTECTED]> wrote: > hello guys ,is there any possibilities to swapping the values of two integer > variables , > without using the following operators. ie (=,>=,<=,==).reply me
1) Why would you even WANT to do this? If you're being asked this in interviews or exams for directly related C or C++ code, then they are at best inappropriate. 2) I believe two older questions are being confused there - swapping two ints without a temporary, and detecting the lesser of two ints without a comparison. I note that in your specific question you ask to swap two ints without using =. Could you possibly tell me how you intend to perform a swap (i.e. a re-assignment) without being able to use the assignment operator? Complete and utter nonsense of a question. Regardless, the following may help with what I think might possibly be the original question: http://tech.groups.yahoo.com/group/c-prog/files/html/swapnotemp.html -- PJH 'Two Dead in Baghdad' not 'product-friendly' - Kent Ertugrul, chief executive of Phorm. http://shabbleland.myminicity.com
