- 81 Views
- Uploaded on
- Presentation posted in: General

Data Types

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

- Basic data types:
- Text
- Numeric

- Numeric data
- stored by numeric variables

- Text data
- stored by string, text, or character variables –
- surrounded by “ “ (ie. “color”)

Types of Data

- Numeric Data
- Integer data (whole numbers)
- 10 25 -45 0

- Real (Floating point) data (numbers that have a decimal point)
- 23.5 -5.0

- Note: 5 and 5.0 are stored differently in a computer even though they have the same value. The first, 5 is an Integer but the second, 5.0 is a Real number.

- Integer data (whole numbers)
- Character data (alphanumerics)
- All the characters you can type at the keyboard
- The type is String or Character

- Numeric data types:
- Integer: whole numbers only
- Floating-point: fractional numeric values with decimal points

- Numeric Data
- Integer data (whole numbers)
- 10 25 -45 0

- Real (Floating point) data (numbers that have a decimal point)
- 23.5 -5.0

- Note: 5 and 5.0 are stored differently in a computer even though they have the same value. The first, 5 is an Integer but the second, 5.0 is a Real number.

- Integer data (whole numbers)
- Character data (alphanumerics)
- All the characters you can type at the keyboard
- The type is String or Character

- Concatenation takes two strings and joins them to create a string result
- The concatenation operator is symbolized, in pseudocode, with a + sign
- Example: if:
- String1 = “yellow” and String2 = “duckie”
- then the statement:
- Set MyFriend = String1 + String2
- results in:
- MyFriend = “yellow duckie”