Answers for Hour 15

   

Answers to Hour 15

1:

True or False: You have to know the start and end values of a for loop at design time to use this type of loop.

A1:

False. You must know these values at runtime, but it isn't necessary to know them at design time.

2:

Is it possible to nest loops ?

A2:

Yes, and this is a common thing to do.

3:

What type of loop would you most likely need to create if you didn't have any idea how many times the loop would need to occur?

A3:

do while

4:

If you evaluate the expression in a do while on the while statement, is it possible that the code within the loop may never execute?

A4:

No. When you evaluate the expression on the while statement, the code within the loop is guaranteed to execute at least once.

5:

What statement do you use to terminate a do while without evaluating the expression on the do or while statements?

A5:

break


   
Top


Sams Teach Yourself C# in 24 Hours
Sams Teach Yourself Visual Basic 2010 in 24 Hours Complete Starter Kit (Sams Teach Yourself -- Hours)
ISBN: 0672331136
EAN: 2147483647
Year: 2002
Pages: 253
Authors: James Foxall

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net