CIS 2500 Chapter Notes - Chapter 1.8: Null Character

45 views3 pages

Document Summary

The called function is given the value of the argument as a temporary variable, not the original. Calling by reference provides reference to the original variable. Call by value helps to compact programs, as there are fewer extraneous variables. This is because parameters are treated as local variables. Variable n is a temporary variable, and is counted down until it becomes 0 then is no longer needed. Whatever is done to n in power has no effect on the argument n that is passed to power. To modify the variable, the address of the variable (a pointer to the variable) must be provided, and the function must declare the parameter to be a pointer. Program which reads a set of text lines and prints the longest. Function getline gets the nextline of input and returns a signal about possible end of file. Copy function copies the new line to a safe place.

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

Related Questions