Parameters: a. If reference parameters can be used in any function, why use valu
ID: 3533229 • Letter: P
Question
Parameters:
a. If reference parameters can be used in any function, why use value parameters at all?
b. How are value parameters useful in processing data in a program?
c. Why is it generally not wise to combine value-returning functions with reference parameters?
d. List 2 situations in which default parameters might be useful..
Arrays:
a. What are at least 2 ways to prevent out of bounds errors when reading input into C-strings?
b. Discuss some useful applications for n-dimensional arrays, such as graphical 3-D or biotechnology applications.
Explanation / Answer
a. because refeerence variable changes the value of original variables but normal parameters don't.
b. they do not alter the value of variables passed as arguments
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.