Sign in
System.Blog.Martens.Ben
The Tech Blog of Ben Martens
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
About
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Tags
2008
BrainTeaser
Code Samples
Connected Systems Division
Data Explorer
encode
gadgets
media
Misc
News
PDC
r2
server
sidebar
techfest
transcode
windows
wmv
WP7
zune
Archive
Archives
March 2013
(1)
November 2012
(1)
May 2012
(2)
April 2012
(1)
February 2012
(1)
January 2012
(1)
December 2011
(2)
November 2011
(3)
October 2011
(1)
January 2011
(1)
June 2010
(2)
November 2009
(3)
October 2009
(2)
September 2009
(1)
May 2009
(1)
March 2009
(1)
January 2009
(1)
December 2008
(3)
November 2008
(1)
October 2008
(2)
September 2008
(2)
August 2008
(2)
July 2008
(2)
June 2008
(7)
May 2008
(3)
April 2008
(1)
March 2008
(3)
January 2008
(2)
December 2007
(2)
November 2007
(2)
October 2007
(6)
September 2007
(1)
August 2007
(6)
July 2007
(1)
June 2007
(2)
May 2007
(4)
April 2007
(3)
March 2007
(5)
February 2007
(3)
January 2007
(5)
December 2006
(2)
November 2006
(3)
October 2006
(3)
September 2006
(6)
August 2006
(9)
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
System.Blog.Martens.Ben
Brain Teaser #3
Posted
over 5 years ago
by
Ben Martens
10
Comments
This brain teaser also comes courtesy of Simeon Cran. What will the following code output? When you think you know, copy the code into Foo.cs and run “csc Foo.cs” and then run “Foo.exe”. Did it output what you expected? The brain...
System.Blog.Martens.Ben
Brain Teaser #2 Answer
Posted
over 5 years ago
by
Ben Martens
0
Comments
Have read the question yet? Read it here . The problem is pretty simple if you have 00111 (where all the bits after the first 1 are also 1’s.) You shift right, run the NOT operator, and then AND that result with the original. For example: ORIGINAL...
System.Blog.Martens.Ben
Brain Teaser #3 Answer
Posted
over 5 years ago
by
Ben Martens
0
Comments
If you haven't read the question yet, you can read it here . The answer for this lies in the C# specification. Specifically, read section 8.13. There are two different ways you can use a using statement and in this case we are interested in the second...
Page 1 of 1 (3 items)