Jump to content
  • Advertisement

Archived

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

robertocarlos

Interesting questions

This topic is 5914 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!