• Advertisement

Archived

This topic is now archived and is closed to further replies.

Interesting questions

This topic is 5697 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 !

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
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...

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

  • Advertisement