• ¿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 2 fuera de 11 páginas
Examen

CSCI Exam 2

Document preview thumbnail
Vista previa 2 fuera de 11 páginas

CSCI Exam 2 Questions And Answers Latest 2026 Update!!!

Vista previa del contenido

CSCI Exam 2
Read the following program:


#include <iostream>


void CalculateSum(int sum){
sum = 0;
for(int i = 0; i < 5; i++){
sum += i;
}
}

int main(){
a. argument
int sum = 0;
CalculateSum(sum); //(sum)
cout << sum << endl;
}


(sum) is best referred to as a(n) ______ when it is
used input to a function.
a. argument
b. global variable
c. parameter
d. static variable

A function can be re-used multiple times
True
throughout your program.

In C++ it is possible for a function to return
multiple independent values in a single return False
statement

In a function prototype, the names of the
True
parameter variables can be left out.

In the function definition below, csquared is known d.
aslocal
what
kind of variable?

, double pythag(double a, double b){
double csquared = pow(a, 2) + pow(b,2);
return csquared;
}


a. global
b. parameter
c. argument
d. local

In the function definition below, (int value1, int value2, int value3) are
known as what kind of variable?


int somefunction (int value1, int value2, int value3){
result = value1 * (value2 + value3) % value2;
result *= 7;
return result + 3;
value parameters
}


a. value parameters
b. global
c. reference parameters
d. arguments

A variable that is accessible by every function in
a program, including main, is called what?
a. local variable
b. global variable
b. global variable
c. static variable
d. program-wide variable

Many functions may have local variables with
True
the same name.

This statement causes a function to end and d. return
optionally send a value back to the part of the
program that called the function.
a. exit
b. quit
c. end

Información del documento

Subido en
8 de abril de 2026
Número de páginas
11
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$16.99

¿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
1
Seguidores
0
Artículos
486
Última venta
2 meses hace



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