Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 27 pages
Exam (elaborations)

CSE 100 EXAM 2 QUESTIONS AND ANSWERS RATED A 100% VERIFIED.

Document preview thumbnail
Preview 3 out of 27 pages

CSE 100 EXAM 2 QUESTIONS AND ANSWERS RATED A 100% VERIFIED.

Content preview

CSE 100 EXAM 2 QUESTIONS AND
ANSWERS RATED A 100% VERIFIED.
True/False: When you make a function call, the order of the arguments you send
does not matter as long as the number of arguments matches the number of
parameters the function has.
False
When only a copy of an argument is passed to a function, it is said to be passed
A) by copy.
B) by reference.
C) informally.
D) by value.
E) by default value.
D) by value.
When a function needs access to an original argument passed to it, for example in
order to change its value, the argument needs to be
A) passed by value.
B) passed into a reference parameter.
C) a static variable.
D) an integer.
E) a constant.
B) passed into a reference parameter.
A function ________ eliminates the need to place the function definition before all
calls to the function.
A) header
B) prototype
C) argument
D) parameter
E) that is void

,B) prototype
A ________ variable is declared outside all functions.
A) local
B) global
C) static
D) counter
E) constant
B) global
In the following statement, what is 22.0?
cout << sqrt(22.0);
A) A memory location.
B) A parameter.
C) An argument.
D) A default value.
E) An lvalue.
C) An argument.
True/False: Although global variables can be useful, it is considered good
programming practice to restrict your use of them.
True
True/False: Both function headers and function calls must list the data types of all
data being passed to the function.
False
A(n) ________ argument is one that is automatically passed to a parameter when
the argument is left out of the function call.
A) floating-point
B) actual
C) null
D) default
E) static

, D) default
True/False: In C++ global and local numeric variables are initialized to zero by
default.
False
A static local variable is one
A) whose value never changes.
B) whose value is retained between function calls.
C) with the same name as a global variable.
D) whose scope is limited to the function it is defined in.
E) that is reinitialized each time the function it is defined in is called.
B) whose value is retained between function calls.
An overloaded function is one
A) that calls other functions.
B) that has the same name as another function.
C) that has too many parameters.
D) that attempts to do too much in a single function.
E) that does different things depending on who calls it.
B) that has the same name as another function.
True/False: You may use the exit() function to return the flow of control from a
function back to main() regardless of where the function was called from.
False
A ________ is a dummy function that is called instead of the actual function it
represents, to test that the call to and return from the function are working
correctly.
A) stub
B) driver
C) test function
D) void function
E) prototype function

Document information

Uploaded on
February 17, 2025
Number of pages
27
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$17.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
saraciousstuvia
4.0
(118)
Sold
572
Followers
380
Items
11331
Last sold
1 month ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions