CIS 2500 Chapter Notes - Chapter 1.2: Decimal Mark, Octal

45 views1 pages

Document Summary

Variables must be declared before use, and are typically declared at the beginning of a function. Declaration: property and name of variable int float char long ie. int fahr, cel; Array, structures, unions also exist and are referred to by pointers and returned with functions. Step 2: if true, execute loop until argument is false. While loops can have more than one argument or statement. C compilers do not care about spacing, spacing is for readability. You cannot multiply a variable by 5/9 you must do 5 * x / 9, because in c, integer division truncates, any fraction is truncated to 0. Printf is a general purpose output formatting function. First argument is string of characters to be printed, with each % indicating to the arguments to be substituted. Print as decimal integer at least 6 characters wide. Print as floating point, at least 6 characters wide. Print as floating point, 2 characters after decimal point.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents