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 6 páginas
Examen

COSC 1436 Chapter 2 Quiz With Complete Solutions

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

COSC 1436 Chapter 2 Quiz With Complete Solutions...

Vista previa del contenido

COSC 1436 Chapter 2 Quiz With
Complete Solutions

In a C++ program, two slash marks ( // ) indicate: - ANSWER The beginning of a
comment

A statement that starts with a # symbol is called a: - ANSWER Preprocessor
directive

For every opening brace in a C++ program, there must be a: - ANSWER Closing
brace

The ________ is/are used to display information on the computer's screen. -
ANSWER cout object

The ________ causes the contents of another file to be inserted into a program. -
ANSWER #include directive

________ represent storage locations in the computer's memory. - ANSWER
Variables

These are data items whose values do not change while the program is running.
- ANSWER Literals

You must have a ________ for every variable you intend to use in a program. -
ANSWER definition

Of the following, which is a valid C++ identifier? - ANSWER June1997
_employee_number
___department
myExtraLongVariableName
All of these are valid identifiers.

The numeric data types in C++ can be broken into two general categories: -
ANSWER integer and floating point

Besides decimal, two other number systems you might encounter in C++
programs are: - ANSWER Hexadecimal and Octal

A character literal is enclosed in ________ quotation marks, whereas a string
literal is enclosed in ________ quotation marks. - ANSWER single, double

, In memory, C++ automatically places a ________ at the end of string literals. -
ANSWER Null terminator

Which escape sequence causes the cursor to move to the beginning of the
current line? - ANSWER \r

What is the modulus operator? - ANSWER %

Which data type typically requires only one byte of storage? - ANSWER char

What is the output of the following statement?

cout << 4 * (15 / (1+3)) << endl;

Select one: - ANSWER 12

In programming terms, a group of characters inside a set of quotation marks is
called aNo: - ANSWER String literal

This is used to mark the end of a complete C++ programming statement. -
ANSWER Semicolon

Which character signifies the beginning of an escape sequence? - ANSWER \

________ must be included in any program that uses the cout object. - ANSWER
The header file iostream

If you use a C++ key word as an identifier, your program will: - ANSWER not
compile

What is the value of cookies after the execution of the following statements?

int number = 38, children = 4, cookies;

cookies = number % children; - ANSWER 2

This function in C++ allows you to identify how many bytes of storage on your
computer system an integer data value requires. - ANSWER sizeof

Character constants in C++ are always enclosed in ________. - ANSWER 'single
quotation marks'

These are used to declare variables that can hold real numbers. - ANSWER
Floating point data types

Información del documento

Subido en
12 de marzo de 2026
Número de páginas
6
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$15.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.
Evergreenview
4.8
(5)
Vendido
17
Seguidores
1
Artículos
3304
Última venta
1 mes 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