What does void mean?
Void means the method doesn't return anything.
The benefit of c++ input and output over c input and output.
What is type safety.
The sentence that is an example of a zero conditional.
a) If it rains, we will cancel the picnic.
b) If you heat ice, it melts.
c) If I had seen him, I would have spoken to him.
d) If he were here, he would help us.
What is b) If you heat ice, it melts.
int, double, char, string, etc. are examples of?
What are data types?
The default return value of functions in C++?
What is int.
Reading an integer called 'myInt', into a variable named myInt.
What is cin >> myInt;
A type of loop executes its body at least once regardless of the condition in C++
What is a do-while loop?
int n = 18;
if(isDivisibleBy2(n))
{
cout << "divisible by 2" << endl;
}
else if(isDivisibleBy3(n))
{
cout << "divisible by 3" << endl;
}
divisible by 2
The items between the parentheses:
int sum(int n1, int n2)
What are Parameters?
How are function arguments passed in C++ by default?
What is by value.
The object is used to report error messages
What is cerr?
The output of the following C++ code:
int i = 5;
int main()
{
for (int i = 0; i < 1; i++)
{ cout << setw(2) << i << " " << ::i << endl; }
}
What is 0 5
string movie = "Sleepy Hollow";
if(movie == "sleepy hollow")
{
cout << "found it" << endl;
}
The purpose of the using namespace
What is to refer to a name from the namespace without the scope resolution operator?
Function overloading in C++
What is having multiple functions with the same name but different parameters?
The output of the following C++ snippet:
string buffer = "";
cout << setfill('-');
cout << setw(10) << buffer << endl;
What are 10 dashes?
The statement which should not be used when working with loops in C++
What is a goto?
The operator used in this expression:
int max_val = (x > y) ? x : y;
What is a ternary operator?
Given:
float calculateArea(float length, float width);
Is this statement:
A - Function definition
B - Function prototype
C - Function call
D - Function method
B - Function prototype
The position default parameters appear in a function prototype
What is the rightmost side of the parameter list.
What is 8?
A practice that should never be done within a for loop in C++
What is modifying the target variable?
What will display:
int day = 1;
switch (day)
{
case 1: cout << "Today is Monday. ";
default: cout << "Today is Unknown.";
}
What is Today is Monday. Today is Unknown.