QUIZ 1 Finals
QUIZ 1 Finals
Test I: Identification
Identify the correct term or concept being described in each item. ANSWER ONLY.
1. It refers to the process of combining two or more strings into a single string.
2. It takes formatted input from standard input devices such as the keyboard.
3. These are unique names given to variables, classes, functions, or other entities by the programmer.
4. A data type that has only one or two values which are true (1) or false (0).
5. This is a C++ statement to specify a block of C++ code to be executed if a condition is true.
6. A keyword used to output/print text.
7. For the given code below, identify the output.
#include <iostream>
using namespace std;
int main() {
int x = 6;
int y = 2;
cout << (x < y);
return 0;
}
8. What is the syntax of an If…else statement?
9. For If Statement, what will happen if the condition evaluates to be false?
10. (2 pts) Enumerate the two ways on how we can concatenate a string.
11. They are predefined words that have special meanings to the compiler.
12. It is a container (storage area) used to hold data.
13. (2 pts) Give two example of C++ Keywords.
ANSWER KEY
Test 1:
1. String Concatenation
2. cin
3. Identifiers
4. Bool
5. If statement
6. Cout
7. 0
8. if (condition) {
// block of code to be executed if the condition is true
} else {
// block of code to be executed if the condition is false
}
9. the code inside the body of if is skipped.
10. By using “+” operation and .append()
11. Keyword
12. C++ Variables/Variables
13. All C++ keywords