What is the meaning of the two parts specified between parentheses in a range-based for loop, separated by a colon?
What’s a benefit of declaring the parameter as a const reference instead of declaring it as a regular object?
Which of the following is a reason why using this line is considered a bad practice? (Alternative: Why is using this line considered a bad practice?)
Suppose you need to keep a data struct with permission to access some resource based on the days of the week, but you can’t use a bool variable for each day. You need to use one bit per day of the week. Which of the following is a correct implementation of a structure with bit fields for this application?
Which choice is not a valid type definition of a structure that contains x and y coordinates as integers, and that can be used exactly as shown for the variable named center?
Consider a pointer to void, named ptr, which has been set to point to a floating point variable g. Which choice is a valid way to dereference ptr to assign its pointed value to a float variable f later in the program?
Which choice does not produce the same output as this code snippet? Assume the variable i will not be used anywhere else in the code.
Which STL class is the best fit for implementing a collection of data that is always ordered so that the pop operation always gets the greatest of the elements? Suppose you are interested only in push and pop operations.
For these declarations, which choice shows four equivalent ways to assign the character “y” in the string to a char variable c?
What is the meaning of the three sections specified between parentheses in a for loop separated by semicolons?
What is a valid definition for the get_length function, which returns the length of a null-terminated string?
Which of the following is not a consequence of declaring the member variable count of my_class as static?
Which of the following STL classes is the best fit for implementing a phonebook? Suppose each entry contains a name and a phone number, with no duplicates, and you want to have lookup by name.