Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 2 fuera de 8 páginas
Examen

COSC 1436 STUDY GUIDE EXAM QUESTIONS AND ANSWERS GRADED A+

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

COSC 1436 STUDY GUIDE EXAM QUESTIONS AND ANSWERS GRADED A+

Vista previa del contenido

COSC 1436 STUDY GUIDE EXAM QUESTIONS AND
ANSWERS GRADED A+
✔✔The expression static_cast<int>(6.9) + static_cast<int>(7.9) evaluates to ____. -
✔✔13

✔✔The length of the string "computer science" is ____ - ✔✔16

✔✔In a C++ program, one and two are double variables and input values are 10.5 and
30.6. After the statement cin >> one >> two; executes, ____. - ✔✔one = 10.5, two =
30.6

✔✔Suppose that count is an int variable and count = 1. After the statement count++;
executes, the value of count is ____. - ✔✔2

✔✔Suppose that alpha and beta are int variables. The statement alpha = --beta; is
equivalent to the statement(s) ____. - ✔✔beta = beta - 1;
alpha = beta;

✔✔Suppose that alpha and beta are int variables. The statement alpha = beta++; is
equivalent to the statement(s) ____. - ✔✔alpha = beta;
beta = beta + 1;

✔✔Suppose that alpha and beta are int variables. The statement alpha = ++beta; is
equivalent to the statement(s) ____. - ✔✔beta = beta + 1;
alpha = beta;

✔✔Choose the output of the following C++ statement:
cout << "Sunny " << '\n' << "Day " << endl; - ✔✔Sunny
Day

✔✔Which of the following is the newline character? - ✔✔\n

✔✔Consider the following code.

// Insertion Point 1

using namespace std;
const float PI = 3.14;

int main()
{
//Insertion Point 2

, float r = 2.0;
float area;
area = PI * r * r;

cout << "Area = " << area <<endl;
return 0;
}
// Insertion Point 3

In this code, where does the include statement belong? - ✔✔insertion point 1

✔✔____ are executable statements that inform the user what to do. - ✔✔prompt lines

✔✔The declaration int a, b, c; is equivalent to which of the following? - ✔✔int a,b,c;

✔✔Suppose that alpha and beta are int variables and alpha = 5 and beta = 10. After the
statement alpha *= beta; executes, ____. - ✔✔alpha = 50

✔✔Suppose that sum and num are int variables and sum = 5 and num = 10. After the
statement sum += num executes, ____. - ✔✔sum = 15

✔✔When reading data into a char variable, after skipping any leading whitespace
characters, the extraction operator >> finds and stores only the next character; reading
stops after a single character. - ✔✔True

✔✔If input failure occurs in a C++ program, the program terminates immediately and
displays an error message. - ✔✔False

✔✔In an output statement, each occurrence of endl advances the cursor to the end of
the current line on an output device. - ✔✔False

✔✔You can use the function getline to read a string containing blanks. - ✔✔True

✔✔Suppose that x and y are int variables. Which of the following is a valid input
statement? - ✔✔cin >> x >> y;

✔✔Suppose that alpha is an int variable and ch is a char variable and the input is:

17 A

What are the values after the following statements execute?

cin >> alpha;
cin >> ch; - ✔✔alpha = 17, ch = 'A'

Información del documento

Subido en
31 de octubre de 2025
Número de páginas
8
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$12.49

¿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

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
BOARDWALK
3.5
(41)
Vendido
283
Seguidores
10
Artículos
32850
Última venta
1 semana 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