C# Fundamentals - Second Edition

Mini Quiz

  1. Which of the following is a data type?
  1. 5
  2. Int
  3. “Hello”
  4. ReadLine()
  1. What data type is the best to use if a number from 1 to 10 needs to be stored?
  1. Int
  2. String
  3. Byte
  4. Char
  1. Will the following code give an error message?
int myNumber = “5”;
  1. Yes
  2. No
  1. What character needs to be placed after a decimal value when being declared?
  1. M
  2. F
  3. D
  4. A character is not needed
  1. Can an unsigned type have the value -21?
  1. Yes
  2. No

 

 

 

Mini Quiz Answers

1. B

2. C – Bytes have a range from 0 to 255 and will use the smallest amount of memory

3. A – Needs to be 5 not “5”

4. A

5. B – Unsigned types can not be negative