Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: MCSD Certification Toolkit (Exam 70-483): Programming in C#
This is the forum to discuss the Wrox book MCSD Certification Toolkit (Exam 70-483): Programming in C# by Tiberiu Covaci, Rod Stephens, Vincent Varallo, Gerry O'Brien; ISBN: 978-1-118-61209-5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: MCSD Certification Toolkit (Exam 70-483): Programming in C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 30th, 2013, 12:36 PM
Registered User
Points: 41, Level: 1
Points: 41, Level: 1 Points: 41, Level: 1 Points: 41, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2013
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Default Errata on question 2 in chapter 2

In the ERRATA section, there is the following update/comment:

Question 2 states:
You need to make a logical comparison where two values must return true in order for your code to execute the correct statement. Which logical operator enables you to achieve this?

Answer given: "D. &&"

However, both answers "D. &&" and "C. &" are correct.


I disagree with this. The question asks for the logical operator, which is &&. The & is a bitwise operator, not a logical operator, that operates on integers.

It may happen that & will act the same way as && in the question that was asked, but it would be very bad practice in the real world to use & when you are doing logical tests.

So I agree with the book that the correct answer is D, and NOT D and C as stated in the errata comment,.
Reply With Quote
The Following User Says Thank You to rg703 For This Useful Post:
cocis48 (June 26th, 2013)
  #2 (permalink)  
Old July 3rd, 2013, 05:22 AM
Registered User
Points: 30, Level: 1
Points: 30, Level: 1 Points: 30, Level: 1 Points: 30, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2008
Location: Auckland, , New Zealand.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Errata to Question 2 Chapter 2

I think the Errata correction is right. & is a bitwise operator, but it is also a logical operator (i.e. its use is overloaded, like say + with ints and strings).

The difference between the two is that & will always evaluate both sides of the expression, whereas && will only evaluate the left side first and if it is false will not evaluate the right hand side.

Personally I have not used the & version, but use && regularly, e.g.
if (myObject != null && myObject.IsValid)

Using & in the above example would result in a NullReferenceException if myObject was null.

I would agree that D is the better answer though.
Reply With Quote
  #3 (permalink)  
Old October 7th, 2013, 02:36 PM
Registered User
Points: 41, Level: 1
Points: 41, Level: 1 Points: 41, Level: 1 Points: 41, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2013
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Default new THREAD

I am having issues creating a NEW THREAD on this forum. Are we no longer allowed to create new threads to this particular forum?
Reply With Quote
  #4 (permalink)  
Old October 8th, 2013, 03:16 AM
Authorized User
Points: 62, Level: 1
Points: 62, Level: 1 Points: 62, Level: 1 Points: 62, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2012
Posts: 17
Thanks: 3
Thanked 0 Times in 0 Posts
Default New Thread problems

I am having the same problem, I sent an e-mail but have heard nothing back
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Errata on Chapter 3 jack_cox BOOK: Professional iOS Network Programming: Connecting the Enterprise to the iPhone and iPad 0 November 8th, 2012 11:30 AM
General question about errata MichielM BOOK: Beginning JavaScript and CSS Development with jQuery 15 May 1st, 2011 04:50 AM
Chapter 4 errata notig BOOK: Beginning Visual C# 2010 1 September 23rd, 2010 10:27 AM
Errata Entry Question corncrake BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 1 February 4th, 2008 07:26 AM
Chapter 9 Question - errata? feck BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 0 January 27th, 2007 04:10 PM



All times are GMT -4. The time now is 02:56 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.