100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Class notes

EOC STUDY GUIDE Final notes

Rating
-
Sold
-
Pages
18
Uploaded on
12-08-2024
Written in
2024/2025

Part 2 of study guide notes

Institution
Collin County Community College
Course
COSC 1436.912










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Collin County Community College
Course
COSC 1436.912

Document information

Uploaded on
August 12, 2024
Number of pages
18
Written in
2024/2025
Type
Class notes
Professor(s)
Charles braun
Contains
All classes

Content preview

EOC STUDY GUIDE PT.2
Functions
1. A collection of statements that performs a specific task is a(n)
a. infinite loop
b. variable
c. constant
d. function
e. decision

2. A function __________ contains the statements that make up the function.
a. prototype
b. definition
c. call
d. expression
e. parameter list

3. A function can have no parameters, one parameter, or many parameters and can return
__________ value(s).
a. zero to many
b. no
c. only one
d. a maximum of ten
e. None of these

4. A function is executed when it is
a. defined
b. prototyped
c. declared
d. called
e. None of these

5. This type of variable is defined inside a function and is not accessible outside the
function.
a. global
b. reference
c. local
d. counter

, e. None of these

6. The value in this type of variable persists between function calls.
a. global
b. internal
c. static
d. dynamic
e. None of these

7. When used as parameters, these types of variables allow a function to access the
parameter's original argument:
a. reference
b. floating-point
c. counter
d. undeclared
e. None of these

8. __________ functions may have the same name as long as their parameter lists are
different.
a. Only two
b. Two or more
c. No
d. Un-prototyped
e. None of these

9. This statement causes a function to end.
a. end
b. terminate
c. return
d. release
e. None of these

10. A function _________ eliminates the need to place a function definition before all calls to
the function.
a. header
b. prototype
c. argument
d. parameter
e. None of these

, 11. If a function is called more than once in a program, the values stored in the function's
local variables do not _________ between function calls.
a. persist
b. execute
c. communicate
d. change
e. None of these

12. If a function does not have a prototype, default arguments may be specified in the
__________.
a. function call
b. function header
c. execution
d. return type
e. None of these

13. Given the following function:
void calc (int a, int& b)
{int c;
c = a + 2;
a = a * 3;
b = c + a;}
What is the output of the following code segment that invokes calc():
int x = 1;
int y = 2;
int z = 3;
calc(x, y);
cout << x << " " << y << " " << z << endl;
a. 1 2 3
b. 1 6 3
c. 3 6 3
d. 1 14 9
e. 2 3 4 5

14. What will the following code display?
#include <iostream>
using namespace std;
void showDub(int);
int main()
{int x = 2;
$6.09
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
raccooncow

Get to know the seller

Seller avatar
raccooncow Collin County Community College (Tx)
View profile
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
1 year
Number of followers
0
Documents
5
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

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

Frequently asked questions