ECS 30 Lecture Notes - Lecture 2: Semicolon, Scanf Format String, Ampersand

35 views6 pages

Document Summary

Smallest c program: de nition of entry function main(): Receives no arguments (void) from the operating system. Returns an integer value (int) to the operating system. Body of function inside braces ({}: body composed of one statement: Statements always end with a semicolon (;) Statements indented by either tabs, or spaces (at least 4 per level) Compile the c le into an executable le. A process exiting with a status different from 0 means that it failed. Output: returns value 0, calls printf() function. A string is a sequence of characters surrounded by double quotes ( ) Sent to the standard output stream (usually the terminal) Special two-character sequence \n to force a newline: includes header stdio. h. Wednesday, 4 april 2018: compilation and execution. Storage location (in memory) associated with a name (identi er: declaration. Creation of a variable in memory: type of the variable is int (integer, name of the variable is the_answer, basic assignment.

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