Chapter 1 introduced you to the basic elements of a C# program. You discovered the requirements for developing, compiling, and executing applications. This chapter focuses on data. Data is the raw facts, the basic numbers and characters that are manipulated to produce useful information. In this chapter, you will begin to see the power of programming when you write applications to perform calculations. You will learn how to declare variables that hold different types of data in memory and see how arithmetic operators react given different kinds of data.

IN THIS CHAPTER, YOU WILL:

Examine how computers represent data

Declare memory locations for data

Explore the relationship between classes, objects, and types

Use predefined data types

Use integral data types

Use floating-point types

Learn about the decimal data type

Declare Boolean variables

Declare and manipulate strings

Work with constants

Write assignment statements using arithmetic operators

Learn about the order of operations

Learn special formatting rules for currency

Work through a programming example that illustrates the chapter's concepts

2 DATA TYPES AND EXPRESSIONS

Bits 66

Bytes 66

Binary Numbering System 66

Character Sets 69

Kilobyte, Megabyte, Gigabyte, Terabyte, Petabyte... 70

Identifiers 71

Variables 75

Literal Values 75

Value Types 79

Basic Arithmetic Operations 92

Increment and Decrement Operations 95

Compound Operations 98

Order of Operations 100

Mixed Expressions 102

Casts 103

Width Specifier 109

Naming Conventions 119

Spacing Conventions 119

Declaration Conventions 120

Review

Pg 125 question 16

Pg 125 question 18

PE01 : Miles, feet, and inches.

PE02 : Miles to Kilometers

PE03 : Celsius to Fahrenheit

PE04 : Ruggy Shoes

PE05 : Take-Home Pay

PE06 : Exam Average

PE07 : Change

PE08 : Weighted Grade

PE09 : Granola Project

PE10 : Monetreal Smoked Meats

Updated: Tuesday, July 28, 2020 3:40 PM

About Us |
Contact Us |
©2005 brentwoodhigh.com