Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

# Chapter 02-02.pptx

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Prochain SlideShare
Chap-02-01.ppt
Chargement dans…3
×

## Consultez-les par la suite

1 sur 18 Publicité

# Chapter 02-02.pptx

it in scm

it in scm

Publicité
Publicité

## Plus De Contenu Connexe

Publicité

### Chapter 02-02.pptx

1. 1. Computer Science: A Structured Programming Approach Using C 2 2-4 Types A type defines a set of values and a set of operations that can be applied on those values. Void Type Integral Type Floating-Point Types Topics discussed in this section:
2. 2. Computer Science: A Structured Programming Approach Using C 3 FIGURE 2-7 Data Types
3. 3. Computer Science: A Structured Programming Approach Using C 4 FIGURE 2-8 Character Types
4. 4. Computer Science: A Structured Programming Approach Using C 5 FIGURE 2-9 Integer Types
5. 5. Computer Science: A Structured Programming Approach Using C 6 sizeof (short) ≤ sizeof (int) ≤ sizeof (long) ≤ sizeof (long long) Note
6. 6. Computer Science: A Structured Programming Approach Using C 7 Table 2-3 Typical Integer Sizes and Values for Signed Integers
7. 7. Computer Science: A Structured Programming Approach Using C 8 FIGURE 2-10 Floating-point Types
8. 8. Computer Science: A Structured Programming Approach Using C 9
9. 9. Computer Science: A Structured Programming Approach Using C 10 sizeof (float) ≤ sizeof (double) ≤ sizeof (long double) Note
10. 10. Computer Science: A Structured Programming Approach Using C 11 2-5 Variables Variables are named memory locations that have a type, such as integer or character, which is inherited from their type. The type determines the values that a variable may contain and the operations that may be used with its values. Variable Declaration Variable Initialization Topics discussed in this section:
11. 11. Computer Science: A Structured Programming Approach Using C 12 FIGURE 2-11 Variables
12. 12. Computer Science: A Structured Programming Approach Using C 13 Table 2-5 Examples of Variable Declarations and Definitions
13. 13. Computer Science: A Structured Programming Approach Using C 14 FIGURE 2-12 Variable Initialization ‘B’
14. 14. Computer Science: A Structured Programming Approach Using C 15 When a variable is defined, it is not initialized. We must initialize any variable requiring prescribed data when the function starts. Note
15. 15. Computer Science: A Structured Programming Approach Using C 16 PROGRAM 2-2 Print Sum of Three Numbers
16. 16. Computer Science: A Structured Programming Approach Using C 17 PROGRAM 2-2 Print Sum of Three Numbers (continued)
17. 17. Computer Science: A Structured Programming Approach Using C 18 PROGRAM 2-2 Print Sum of Three Numbers (continued)

### Notes de l'éditeur

• wchar_t is a wide character:  The increased datatype size allows for the use of larger coded character sets. Width is compiler specific (not portable).