COMP 202 Lecture Notes - Substring, Operand, If And Only If
107 views2 pages
26 Dec 2013
School
Department
Course
Professor
hwpark22 and 40159 others unlocked
100
COMP 202 Full Course Notes
Verified Note
100 documents
Document Summary
Variables: give a variable a name and a type. Type = kind of data (int, double, string etc. Int variable = keyboardreader. next. int(): a variable you create inside a block of code is not the same outside that block. Types of variables: boolean (<= 1byte) : store true or false, byte(1) : can only store between( -128 and 127, char(2) : stores one character (0 < x < 216 1) Short(2) : small numbers (-32,768 < x < 32,767) To store you need to do char x = \ (\) is also used to store new line (\n) int double no: info lost : double int: some info lost. Int (4) : integer (231 < x < -231 -1 ) size in byte 4 long (8): long numbers (pi) (-263 < x < 263-1) float(4) : like double stores numbers; although 32bit. Example: 3. 0f (approx) +/- 3. 4 * 1038: double (8) : stores fractions (approx) +/- 1. 8 * 10308.
Get access
Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers