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

C857 Test Questions & Answers(RATED A)

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

variable -ANSWER named location in memory main function -ANSWER called when the program starts cout -ANSWER a filestream variable that represents the default output device #include iostream -ANSWER include directive needed to allow use of the various I/O operators such as cout and cin. preprocessor directive -ANSWER C program line beginning with # that provides an instruction to the preprocessor; instruction to the compiler to change the source code before compilation. how to enable printing of output (C++) -ANSWER #include iostream using namespace std; endl -ANSWER a stream manipulator that can be used to advance the cursor to the next line on the computer screen; starts new output line cin -ANSWER a filestream variable that represents the default input source block comment -ANSWER Multiline (usually) comment; enclosed between /* and */ over multiple lines in the source code. literal -ANSWER a specific value in code, like 2 include statement and namespace statement needed to use e.g. cout, cin, endl -ANSWER #include iostream using namespace std; approximate max value that int can handle -ANSWER ~2 billion (2,000,000,000) When the / operands are integers, the division operator / performs integer division, throwing away any ______ -ANSWER When the / operands are integers, the division operator / performs integer division, throwing away any remainder. Examples: 24 / 10 is 2. 50 / 50 is 1. 1 / 2 is 0. 2 divides into 1 zero times; remainder of 1 is thrown away. const -ANSWER Make a variable unmodifiable. When a variable represents a literal, the variable's value should not be changed in the code. If the programmer precedes the variable declaration with the keyword ____, then the compiler will report an error if a later statement tries to change that variable's value. include statement for standard math library -ANSWER #include cmath implicit conversion -ANSWER the automatic transformation of one data type to another For an arithmetic operator like + or *, if either operand is a double, the other is automatically converted to double, and then a floating-point operation is performed. For assignment =, the right side type is converted to the left side type. -int-to-double conversion is straightforward: 25 becomes 25.0. -double-to-int conversion just drops the fraction: 4.9 becomes 4 static_cast operator -ANSWER explicitly converts (or type casts) data from one data type to another A programmer can precede an expression with static_casttype(expression) to convert the expression's value to the indicated type. include statement for standard string library -ANSWER #include string how to read an input string containing spaces using getline -ANSWER getline(cin, stringVar) using rand() with modulo to generate random value limited to certain number of values -ANSWER Generally, rand() % N yields N possible values, from 0 to N-1. srand() -ANSWER Seeds the random number generator a C++ built-in function used to initialize the rand function


Información del documento

Subido en
26 de enero de 2024
Número de páginas
8
Escrito en
2023/2024
Tipo
Examen
Contiene
Preguntas y respuestas
$11.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.
papersbyjol
3.8
(79)
Vendido
449
Seguidores
254
Artículos
14161
Última venta
2 semanas 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

Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.