C857 Test Questions and Answers(RATED A)
C857 Test Questions and Answers(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. RATED A)
Document information
- Uploaded on
- January 26, 2024
- Number of pages
- 8
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers