Answers for Hour 12

   

Answers to Hour 12

1:

What data type would you use to hold currency values?

A1:

decimal

2:

Which data type can be used to hold any kind of data and essentially serves as a generic data type?

A2:

object

3:

What values does C# support for type bool?

A3:

true or false

4:

What can you create to eliminate magic numbers by defining a literal value in one place?

A4:

Constant

5:

What type of data element can you create in code that can have its value changed as many times as necessary?

A5:

Variable

6:

What are the first and last indexes of an array dimensioned using string_strMyArray[5] ?

A6:

First index = 0, last index = 4

7:

What word is given to describe the visibility of a constant or variable?

A7:

Scope

8:

In general, is it best to limit the scope of a variable or to use the widest scope possible?

A8:

It is usually best to limit scope.


   
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