CHAP10 - Chapter 10 Simple Data Types Built-In and User-Defined Chapter10 SIMPLEDATATYPES CHAPTER GOALS To be able to identify all of the simple

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
173 Chapter 10 Simple Data Types: Built-In and User-Defined Chapter 10 SIMPLE DATA TYPES: BUILT-IN AND USER-DEFINED CHAPTER GOALS To be able to identify all of the simple data types provided by the C++ language. To become familiar with specialized C++ operators and expressions. To be able to distinguish between external and internal representations of character data. To understand how floating-point numbers are represented in the computer. To understand how the limited numeric precision of the computer can affect calculations. To be able to select the most appropriate simple data type for a given variable. To be able to declare and use an enumeration type. To be able to use the For and Switch statements with user-defined enumeration types. To be able to distinguish a named user-defined type from an anonymous user-defined type. To be able to create a user-written header file. To understand the concepts of type promotion and type demotion. CHAPTER OUTLINE I. Built-In Simple Types A. Integral Types 1. Ranges of Values 2. Literal Constants B. Floating Point Types 1. Ranges of Values 2. Literal Constants II. Additional C++ Operators A. Assignment Operators and Assignment Expressions B. Increment and Decrement Operators C. Bitwise Operators D. The Cast Operation E. The sizeof Operator F. The ?: Operator G. Operator Precedence III. Working with Character Data A. Character Sets B. C++ char Constants C. Programming Techniques 1. Comparing Characters 2. Converting Digit Characters to Integers 3. Converting to Lowercase and Uppercase 4. Accessing Characters Within a String
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
174 Chapter 10 Simple Data Types: Built-In and User-Defined IV. More on Floating Point Numbers A. Representation of Floating Point Numbers B. Arithmetic with Floating Point Numbers C. Implementation of Floating Point Numbers in the Computer 1. Model Numbers 2. Comparing Floating-Point Numbers 3. Underflow and Overflow 2. Cancellation Error Background Information : Practical Implications of Limited Precision Software Engineering Tip : Choosing a Numeric Data Type E. Background Information: Practical Implications of Limited Precision V. User-Defined Simple Types A. The Typedef Statement B. Enumeration Types 1. Assignment 2. Incrementation 3. Comparison 4. Input and Output 5. Returning a Function Value C. Named and Anonymous Data Types D. User-Written Header Files VI. More on Type Coercion A. Type Coercion in Arithmetic and Relational Expressions B. Type Coercion in Assignments, Argument Passing, and Return of a Function Value VII. Problem-Solving Case Study : Finding the Area Under a Curve VIII. Problem-Solving Case Study : Rock, Paper, Scissors IX. Problem-Solving Case Study: Birthday Reminder X. Testing and Debugging A. Floating Point Data B. Coping with Input Errors C. Testing and Debugging Hints XI. Summary GENERAL DISCUSSION This chapter begins the transition from the control structures orientation of the first half of the book to the abstract data type orientation of the second half. The chapter includes many new and important concepts: a
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/13/2011 for the course CSC 140 taught by Professor Lebre during the Spring '04 term at Moraine Valley Community College.

Page1 / 21

CHAP10 - Chapter 10 Simple Data Types Built-In and User-Defined Chapter10 SIMPLEDATATYPES CHAPTER GOALS To be able to identify all of the simple

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online