COP3014 Programming I - Chapter 2
In C++11, if you want an integer literal to be treated as a long long int, you can append ________ at the end of the number.
LL
The ________ is(are) used to display information on the computer's screen.
cout object
Using C++11: What data type does the compiler determine for the variable cost in the following statement? auto cost = 14.95;
double
What is the value stored in the variable myNum after the following assignment statement executes?myNum = 23 % 5
3
Which control sequence is used to skip over to the next horizontal tab stop?
\t
Given the following program, which line(s) cause(s) output to be displayed on the screen? 1// This program displays my gross wages. 2// I worked 40 hours and I make $20.00 per hour. 3#include 4using namespace std; 5 6int main() 7{ 8int hours; 9double payRate, grossPay; 10 11hours = 40; 12payRate = 20.0; 13grossPay = hours * payRate; 14cout << "My gross pay is $" << grossPay << endl; 15return 0; 16}
line 14
In memory, C++ automatically places a(n) ________ at the end of string literals which ________.
null terminator, marks the end of the string
A variable definition tells the computer
the variable's name and the type of data it will hold
A(n) ________ represents a storage location in the computer's memory.
variable