COM SCI 31 Study Guide - Midterm Guide: Off-By-One Error

110 views4 pages

Document Summary

Types for numbers: numbers that can have a fraction: double 10 to -308 to 10 to 308. Nu(cid:373)(cid:271)ers that (cid:272)a(cid:374)(cid:859)t ha(cid:448)e a fra(cid:272)tio(cid:374): i(cid:374)t -2 billion to 2 billion. Identifier can have: zero or more letters, digits, underscore_ 14%5 4 (modulus remainder mod=%) with negative numbers it can be different example: 14/-5 and 14%-5. 3 -1 if statements if (condition) statement can be a compound statement {stat;stat;stat;stat} else statement you can discard the else part of the if statement string citizenship; if (cid:894)(cid:272)itize(cid:374)ship== (cid:862)u (cid:863)|| (cid:272)itize(cid:374)ship== (cid:862)ca(cid:374)ada(cid:863)(cid:895) || means or first part is evaluated first project 10. && means and both need to me true to be true. Switch switch(choice) case1: break; case2: case4: break; case3: case5: break; default: (cid:272)out<< (cid:862)(cid:272)hoi(cid:272)e (cid:373)ust (cid:271)e (cid:1005) through 5. Strings: objects that represent a sequence of character. C++ little support for string always have to reference the library.

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