O'Reilly logo

Visual C#® 2012: How to Program, Fifth Edition by Harvey Deitel, Paul Deitel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Answers to Self-Review Exercises

3.1 a) left brace ({), right brace (}). b) semicolon (;). c) if. d) //. e) Blank lines, space characters, tab characters. f) Keywords. g) Main. h) Console.WriteLine and Console.Write.

3.2

a) False. Comments do not cause any action to be performed when the app executes. They’re used to document apps and improve their readability.

b) False. C# is case sensitive, so these variables are distinct.

c) False. The remainder operator also can be used with noninteger operands in C#.

d) False. The operators *, / and % are on the same level of precedence, and the operators + and - are on a lower level of precedence.

3.3

a) int c, thisIsAVariable, q76354, number;

or

int c; int thisIsAVariable; int q76354; int number;

b)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required