COMP 202 Study Guide - Final Guide: Khanqah, Dynamic Array, Opata Language

626 views2 pages
hwpark22 and 40159 others unlocked
COMP 202 Full Course Notes
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. keyboardreader is the same: a variable you create inside a block of code is not the same outside that block. Types of variables o o o o o o o. Boolean (<= 1byte) : store true or false. Byte(1) : can only store between( -128 and 127) Short(2) : small numbers (-32,768 < x < 32,767) Char(2) : stores one character (0 < x < 216 1) To store you need to do char x = \"" (\) is also used to store new line (\n) Example: 3. 0f (approx) +/- 3. 4 * 1038: double (8) : stores fractions (approx) +/- 1. 8 * 10308. 3. 0 is considered a double; 64 bits mem o. String : letters: inside method, variables defined in the method header will have value of expression passed to them: math. pow(3, 4. 0 + 3)

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

Related Documents

Related Questions