Title | CS110 Assignment 4 - this is based on the computer problems and solving |
---|---|
Author | Mahbub Hasan |
Course | Computer Science |
Institution | University of Regina |
Pages | 3 |
File Size | 59.6 KB |
File Type | |
Total Downloads | 52 |
Total Views | 128 |
this is based on the computer problems and solving...
CS 110- Programming and Problem Solving Assignment 4 Question 1: When arguments are passed through the calling code and the called function, parameters and their corresponding arguments are matched by: B. Their relative positions in the parameter and argument lists.
Question 2: The scope of a function parameter is identical to the scope of a local variable declared in the outermost block of the function body: A. True
Question 3: If a variable v is accessible only within a function named “foo”, then v is either B. A local variable within foo or an argument to foo.
Question 4: Let, fun be a function defined as follows: void fun(int& alpha, int beta ) { alpha = beta; beta = 10; } What is the output of the following instructions? int a = 5; int b = 5; fun(a,b); cout...