+
CMSC 330 QUIZ 4

CMSC 330 QUIZ 4

Rating:
Rating
(0)
Author: Joyce Buda
Description:

http://theperfecthomework.com/cmsc-330-quiz-4/

Quiz
Top of Form

Note: It is recommended that you save your response as you complete each question.

Question 1 (5 points)
 
Which of the following parameter passing techniques involves copying the argument to the corresponding parameter?
Question 1 options:
 
Call by result

 
Call by reference

 
Call by name

 
Call by value

Save
Question 2 (5 points)
 
In languages that distinguish between procedures and functions how do procedure calls compare to function calls?
Question 2 options:
 
Both function and procedure calls are expressions

 
Both function and procedure calls are statements

 
A function call is an expression whereas a procedure call is a statement

 
A function call is a statement whereas a procedure call is an expression

Save
Question 3 (5 points)
 
What is the scope of a local variable?
Question 3 options:
 
The package

 
The class

 
The subprogram

 
The program

Save
Question 4 (5 points)
 
When the static modifier is placed on a C++ local variable, what does it change?
Question 4 options:
 
The lifetime of the variable

 
The scope of the variable

 
Both the scope and lifetime of the variable

 
The initial value of the variable

Save
Question 5 (5 points)
 
Which is the following is not contained in an activation record?
Question 5 options:
 
Local variables

 
Global variables

 
Parameters

 
Temporary variables

Save
Question 6 (5 points)
 
For which of the following parameter passing techniques can the argument be a constant or an expression?
Question 6 options:
 
Call by value

 
Call by result

 
Call by reference

 
Call by value-result

Save
Question 7 (5 points)
 
Which of the following function prototypes would be permitted for a C or C++ function with a multidimensional array parameter?
Question 7 options:
 
void f(int matrix [10][])

 
void f(int matrix)

 
void f(int matrix [][])

 
void f(int matrix [][10])

Save
Question 8 (5 points)
 
In which of the following languages is it impossible to write a subprogram that swaps two parameters of a primitive integer type?
Question 8 options:
 
Java

 
Ada

 
C

 
C++

Save
Question 9 (5 points)
 
Which of the following languages does not permit operator overloading?
Question 9 options:
 
Java

 
C#

 
Ada

 
C++

Save
Question 10 (5 points)
 
Which of the following languages does not permit subprograms or pointers to them to be passed as parameters?
Question 10 options:
 
Ada

 
Pascal

 
C++

 
Java

Save


(more)
See More
Try a College Course Free

Sophia’s self-paced online courses are a great way to save time and money as you earn credits eligible for transfer to over 2,000 colleges and universities.*

Begin Free Trial
No credit card required

25 Sophia partners guarantee credit transfer.

221 Institutions have accepted or given pre-approval for credit transfer.

* The American Council on Education's College Credit Recommendation Service (ACE Credit®) has evaluated and recommended college credit for 20 of Sophia’s online courses. More than 2,000 colleges and universities consider ACE CREDIT recommendations in determining the applicability to their course and degree programs.

Tutorial