ECS 30 Lecture Notes - Lecture 4: Reserved Word, Data Type, C Standard Library

40 views6 pages

Document Summary

Identi ers: example using a reserved word, standard identi ers. Identi ers de ned by the standard c library. Can be rede ned, but probably not a good idea. Monday, 9 april 2018: example using a standard identi er, user identi ed identities. Smart choice: avoid meaningless identi ers (or only for very speci c use-cases) Int a, b1, c;double tmp: instead, nd descriptive identi ers. !2: any decent text-editor offers auto-completion, so no excuse for not using. Snake_case: traditional style for c, consistent case (either all lower or all upper, underscores for representing spaces between words. Camelcase: traditional style for java or . net, spaces are stripped, first letter of each word is capitalised, also camelcase ( rst word is not capitalized) Int thisisavariable = 0: choose one style (the most readable to you) throughout the same program and stick to it, the most important is style consistency.

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

Related Questions