CISC 220 Lecture 20: Intro to C (Arrays and functions)

32 views2 pages

Document Summary

Week 6 class 2 - intro to c (continued) Grades for assignment 1 is also posted. Surprised at the number of hiccups about the variables. Reminder that there are no booleans in c. can substitute with int num = 0 and int num = 1 sentinel value: often -1, used to signal something (because it"s not a real data point) An array is really a contiguous chunk of memory in the computer, so when you pass it as a parameter, you are really passing the address in memory. More about arrays after pointers + addresses can do arithmetic with pointers, unlike java or any other programming language we have used before. No . length (in java, it is an object with a length property. Functions similar to java/c++ (no ref parameters like in c++) Example: in main: x = 24 suspend main while calling demo.

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