CISC 220 Lecture Notes - Lecture 7: Exit Status, C Syntax, C Preprocessor

71 views3 pages

Document Summary

Functions very similar to java/c++ but all parameters are passed by value: no ref parameters like in c++ If a value (x) is passed by main and changed but not returned, x will not have changed when you"re back in the main: you can pass an address but we"ll get to that later. Main function: optional parameters (command-line arguments, must return an int which will be your exit status, 0 for success and non-0 for error, to abort a program from a function that"s not main: exit(1, this is in Global variable use with caution; it can make the program less readable. The c pre-processor two phases of c compilation: Language: every line starting with # is a command to the pre-processor, ** pre-processor syntax is not the same as c syntax, to run pre-processor by itself: cpp -p

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