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 October 22nd, 2016, 07:00 PM
Registered User
 
Join Date: Oct 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 2-Q9

How many times will this loop execute?
int value = 0;
do
{
Console.WriteLine (value);
} while value > 10;
a. 10 times
b. 1 time
c. 0 times
d. 9 times

for ex. to compile, you have to put the condition of while in parantheses otherwise, won t compile, so i d say the correct answer is 0 and not b.1 times
Thank you!
 
Old October 23rd, 2016, 10:51 AM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

Yes, you're right. Sort of. As written the Visual Studio refuses to run the code.

I think the problem is really a typo and the parentheses should be present rather than the answer is wrong.

Either way, though, it sounds like you understand the code, and that's good! ;-)
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 4 --> Chapter 5 Continuity?? theboffin BOOK: Professional ASP.NET MVC 4 4 July 8th, 2013 03:36 AM
Chapter 6 - Code Download Missing for this Chapter dbaechtel BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 0 August 11th, 2009 11:02 AM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM





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