CMSC 216 Chapter 1-6: CProgramming Ch1-6 Notes

139 views5 pages

Document Summary

Common conversion specifiers: d (integer, p specifies minimum number of digits, will add 0"s if necessary %d is same as %. 1d ) e (floating point number in exponential format, p indicates how many digits after decimal point) f (displays floating point in fixed decimal format without exponent) g (displays floating point number in exp. or fixed decimal format depending on size , p is number of significant digits) 4 increment (postfix) decrement (postfix) increment (prefix) decrement (prefix) unary plus, minus multiplicative additive. Selection statements ( if and switch ): if (line_num == max_lines) line_num = 0 statement only */ if (line_num == max_lines) { line_num = 0 page_num++ if (i > j) if (i > k) statement */ else max = i max = k else if (j > k) max = j else max = k . Example: switch (grade) { case 2: statements */ case 1: case 0: default:

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