3.1 The concept of constant and printouts

Constant: During the program run, a fixed amount unchanged.

 

Constant Category:

1. Character Constants: Any double quotes portion ,, called the string constants. For example: "abc", "Hello", "123"

2. Integer constants: number on the direct write, no decimal point. For example: 100,200,0, -250

3. Float constant: to write directly on the numbers, decimals. For example: 2.5, -3.14,0.0

4. character constant: all caused by a single character in single quotes, to do a character constant. For example: 'A', 'b', '9', 'medium'

5. Boolean constants: Only the amount of value. true, false

6. Empty constants: null. No data on behalf of

Guess you like

Origin www.cnblogs.com/sdrbg/p/10944259.html