CS 161 Lecture Notes - Lecture 8: Subroutine, Computer Programming, Infinite Loop

35 views2 pages

Document Summary

Cs 161 lecture 8 error handling and functions: prevent our program from crashing, reasons programs will crash or have issues: Runtime error: program stops running due to segmentation fault or infinite loop potentially caused by trying to access memory that is not allocated, bad. Check_length: the end of a string is determined by the invisible null character \0 , while the character in the string is not null, keep counting, examine each character until the null (special character) is found. Null character says, this is the end: use getline to use, not cin. Assignment 3 notes: need to understand how length works, use getline, allowed functions: From : pow(: typecasting allowed only if the character being converted fits the stated criterion (character was confirmed as an int, letter, etc. , ascii chart should be used heavily. Debugging side bar: read compiler messages when you have a syntax error, as your codes getting longer, there will be more complex bugs.

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