Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 30th, 2013, 12:36 PM
Registered User
 
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,.
The Following User Says Thank You to rg703 For This Useful Post:
cocis48 (June 26th, 2013)
 
Old July 3rd, 2013, 05:22 AM
Registered User
 
Join Date: May 2008
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.
 
Old October 7th, 2013, 02:36 PM
Registered User
 
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?
 
Old October 8th, 2013, 03:16 AM
Authorized User
 
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





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.