INST 201 Lecture Notes - Lecture 6: Null Character, Carriage Return, Compile Time

38 views4 pages

Document Summary

Programming is essentially the manipulation of many variables. The basic variable data types which c++ variables can assume are: int (integers), char (characters) and doubles (real decimals). Declaring a variable simply means letting the computer know that you want to reserve a spot in memory for it. Here is an example of declaring a variable: int number_of_items; Defining (or initializing) a variable is giving it a value. Variables can be defined at their declaration: char initial = "b"; double x_coordinate = 46. 72168000517; Of course, variables can be assigned values at a later time, too: int trees, shrubs; trees = 6; shrubs = trees; It is important to note that characters are represented by numbers in the computer, and a char variable can be assigned a numerical value. Some characters do not have their own symbol and must be referenced by an escape sequence. Some escape sequences are: "\" -- backslash "\"" -- single quotation mark """

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents