• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 18 páginas
Notas de lectura

EOC STUDY GUIDE Final notes

Document preview thumbnail
Vista previa 3 fuera de 18 páginas

Part 2 of study guide notes

Vista previa del contenido

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;

Información del documento

Subido en
12 de agosto de 2024
Número de páginas
18
Escrito en
2024/2025
Tipo
Notas de lectura
Profesor(es)
Charles braun
Contiene
Todas las clases
$6.59

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Vendido
0
Seguidores
0
Artículos
5
Última venta
-



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes