Chapter 5, Making Decisions in Code

Pop quiz – understanding if statements

Q1

True or false.

Q2

The NOT operator, which is the exclamation mark (!).

Q3

The AND operator, which is two ampersand signs (&&).

Q4

The OR operator, which is a double-bat (||).

Pop quiz – understanding an array and a List

Q1

The location in an array, or a List, where data is stored.

Q2

The first element in an array, or a List, has an index number of zero. This is called zero indexed.

Q3

No. When an array or a List is declared, the type of data it can store is specified, and only that type can be stored in its elements.

Q4

An array cannot be dynamically expanded. Once an array is initialized, it can't change its size. This is why a List is more flexible. A ...

Get Learning C# by Developing Games with Unity 3D Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.