Computer Science 1026A/B Chapter Notes - Chapter 2: Primitive Data Type, Elementary Arithmetic, String Literal

93 views11 pages
terubarenuka and 39895 others unlocked
COMPSCI 1026A/B Full Course Notes
26
COMPSCI 1026A/B Full Course Notes
Verified Note
26 documents

Document Summary

Variable: a variable is a storage location in a computer program. Each variable has a name and holds a value. Assignment statement: an assignment statement stores a value in a variable. A variable is created the first time it is assigned a value. Assigning a value to an existing variable replaces the previously store value. The assignment operator = does not denote mathematical equality. Data type: the data type of a value specifies how the value is stored in the compute and what operation can be performed on the value. The data type provide by the language itself is called a primitive data type. (float, string, int, etc) Literal == it basically means the value in the given variable/data type. Once you have initialized a variable with a value of a particular type, you should take care that you keep storing values of the same type in that variable. For example, because tax rates are not necessarily.

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