Interesting questions

Started by
1 comment, last by robertocarlos 21 years, 9 months ago
I''m relatively new to programming. Am looking for some programming questions that are interesting Eg. how do you swap 2 no''s without using a third variable. Also questions asked in interviews, to test your programming skills. Any questions or pointers to resources will be appreciated. The sky is the limit !
The sky is the limit !
Advertisement
quote:
how do you swap 2 no''s without using a third variable.


Can''t be done...
Well, it can, but you can only swap two 32 bit integers without using a third, unless they''re both less than 2^16 (so you''ve got 16 bits for the swaping)...

You can find tons, and tons of great questions in the articles and resources section...
actually it can, for any data types that you can xor

You know, I never wanted to be a programmer...

Alexandre Moura

[edited by - alexmoura on July 18, 2002 4:18:44 PM]

This topic is closed to new replies.

Advertisement