Hint: you can ask for different sequences of Fibonaci numbers by changing the arguments when you call the compiled program. If you output the compiled program into 11fibo for example you can
11fibo 12 14for example.
Recode it using pass by value of a pointer. In other words, you may not put & in the header of the function. You must use '*' and '&' as prefix operators in expressions. When the program is changed it still does the same thing.
Link the fixed and the original code to your web page.
4 Call by Name in C++
Note. Call by name is alive and well in C++,
if you have time look at
[ name.cpp ]
for an example of Jensen's device from Algol 60.
Deliverables
Prepare a simple page with links to your lab work today
explaining what you have learned in lab today about C++
functions. Link this page into your index/home/cs320 page.
. . . . . . . . . ( end of section CSci320 Laboratory 10 Functions in C++) <<Contents | End>>
Check the Preparation for next class
[ ../11.html ]