COM SCI 31 Lecture Notes - Lecture 4: Newline

21 views4 pages
13 Apr 2017
School

Document Summary

X is 5. 9 int a = 10 int b = a * a int c = 25/(b-100) Grammatically correct, but will produce different incorrect results double d; double e = 2 * d; cout << e; d not initialized. Will compile, but will get a warning. So compile d and e, might get weird results int f = 1000; int g = f * f * f; int h = f * g; Declare f=1000, g=1000000000, h=trillion; too large for an int (negative 2 billion to positive 2 billion) Program might crash; or get wired number for h. 32 if you live, net year you will be 33. If you live, next year you will be 33. When you read a number, and the next thing you"ll read is a string using getline, then. Program does os writes os holds available to program.

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