FA3 Flashcards
All lines beginning with two slash signs (//) do have any effect on the behavior of the program.
Group of answer choices
True
False
False
C++ is not case-sensitive programming language.
Group of answer choices
True
False
False
Which of the following is not an example of program statements seen inside a main() function?
Group of answer choices
read keyboard input such as cin»number;
perform mathematical operations such as sum = a + b;
preprocessor directive such as #define FALSE 0
display information on the screen such as cout«”Hello”;
preprocessor directive such as #define FALSE 0
The following statements are true about C++ except __________.
Group of answer choices
It uses compilation process.
It is a low-level language.
It is case sensitive.
It supports procedural, object-oriented, and generic programming.
It is a low-level language.
Which of the following symbols is best used to make a 20-line statements as block comment?
Group of answer choices
/* */
??
//
/* */
Namespace std contains all the classes, objects and functions of the standard C++ library.
Group of answer choices
True
False
True
All C++ statements that need to be executed are written within main ( ).
Group of answer choices
True
False
False
The symbols that indicates the beginning of main’s function definition.
Group of answer choices
}
{
<>
#
{
Two slash signs inserted by the programmer in his C++ program indicate that the rest of the line is a comment.
Group of answer choices
True
False
True
These are names that are given to various elements of a program created by the program.
Group of answer choices
Tokens
Identifiers
Constants
Keywords
Identifiers
An operator that is also called ternary operator.
Group of answer choices
Conditional Operator
Increment Operator
Triad Operator
Modulo Operator
Conditional Operator
The following statements are TRUE in creating identifiers except _______
Group of answer choices
Special characters are allowed.
An identifier must not be one of the keywords.
Blank spaces are not allowed instead use underscore(_).
The first character must be a letter or underscore.
Special characters are allowed
A sequence of letters, digits or underscore that may be used as a name of a variable, function, or class.
Group of answer choices
Variable
Keywords
Constants
Identifiers
Identifiers
Which of the following can be considered as a valid identifier?
Group of answer choices
Final_Grade
First Name
$Area
123Height
Final_Grade
Consider the following statements:
int x = 22,y=15;
x = (x>y) ? (x+y) : (x-y);
What will be the value of x after executing these statements?
Group of answer choices
7
Error. Cannot be executed
22
37
37
All variables must be declared before it will be used. Which of the following is a correct
declaration of variables?
Group of answer choices
char opt 1;
float Wt, Ht;
float Vol; A;
int x,y
float Wt, Ht;
What value is placed in var? var = 12 > 9 ? 0 : 1;
Group of answer choices
1
9
12
0
0
Which of the following is NOT a primitive data type in C++ programming?
Group of answer choices
int
char
float
string
string