course.wilkes.edu/CS125Labs
Welcome to the site for CS 125 labs!

 

Experiment 1: Changing Value Parameters

The Question: Is it permissible to alter (e.g., assign a value to) a value parameter?

Hypothesis: In the space below, construct a hypothesis that answers the question. (Don't worry -- hypotheses aren't graded - just make a guess.)



The Experiment: The params.cpp source program is set up as an experiment to test your hypothesis. Function Change() is currently defined as follows

void Change(int param1, int param2, int param3)
{
        param1 = 1;
        param2 = 2;
        param3 = 3;
}
and is called in the main program with the statement:
   Change(arg1, arg2, arg3);
so that if it is not permitted to alter a value parameter, then compiling params.cpp will produce errors.

Observation: Translate your source program. In the space below, record what you observe.





Conclusions: Review the definition of a value parameter, and record your conclusions.





 
  Home

Help

Lab 0

Lab 1

Lab 2

Lab 3a

Lab 3b

Lab 4

Lab 5

Lab 6

Lab 7

Lab 8

Lab 9

Lab 10

Lab 11

Lab 12

Lab 13



Membership

Login




Last update: Wednesday, August 23, 2000 at 3:02:24 PM.
visitors to this page.