CIS 3100 Lecture Notes - Lecture 3: Decimal Mark, Strong And Weak Typing

86 views3 pages

Document Summary

C++ is a strongly typed language every variable before you can use it must be explicit declared/ defined. You don"t need to declare a variable: simplify the problem. Make sure it works @ this state. Does it matter where i declare a variable? declare variables closest place to where we use it. Rule #1: when you declare a variable the scope of the variable section in which it lives determined by { } Depending on which curly brackets you declare. {} executed > variable created in within {} only in which they are defined. All sub blocks can also see the variable but not the code outside the block > after executed gets destroyed double prem = 50; is a shortcut for prom = 50; ___________________________________ double vs int if you know for a fact that the age an never be . 5 (26. 5)

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