CSC209H5 Chapter Notes - Chapter 2: Camel Case, String Literal, In C

15 views2 pages

Document Summary

Csc209h5s - software programming and tools (winter 2018) Compiler - converts code into detailed set of instructions for the computer to understand (input, output, both etc. ) Program contains a main() function with instructions (code) inside curly braces. #include /* add code from another file (in this case print) int main() { printf( "hello world! " ); /* "hello world" is a string literal */ return 0 ; Variable names can only contain letters, numbers and underscores ( _ ), cannot start with a number and are case-sensitive. You can declare multiple variables at once int num_1, num_2, num_3; Example int sum = 5 + 10 ; /* will store the value 15 */ In c programming, whitespace has no effect on your code/program. Important style conventions: operators should have space on both sides, each statement should be on seperate lines snake_case (pothold_case) used for variable names. Each new word begins with an uppercase letter.

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