Ch. 2: Introduction to C++ Ch. 2.1: The Parts of a C++ Program Flashcards
What operator is used for writing a comment?
// marks the beginning of a comment. The compiler ignores everything from the double slash to the end of the line.
What does a preprocessor directive code start with?
A #. I.e. #include
What is the <iostream> header file?</iostream>
The brackets < > indicate it is a standard C++ program to display output on the screen and read input on the keyboard.
What is a namespace?
Used to organize names of program entities.
What does namespace std mean?
Declares the program will be accessing entities whose names are part of the namespace called std.
What is a function?
One or more programming statements that collectively have a name.
What is a string literal or a string constant?
Group of characters inside quotation marks.
What does a // do?
Marks the beginning of a component.
What does a pound sign indicate?
Marks the beginning of a preprocessor directive.
What do opening “<” and closing “>” brackets indicate?
Enclose a filename when used with a #include directive.
What do opening “(“ and closing “)” parenthesis indicate?
Used in naming a function, as in int main().
What do opening “{“ and closing “}” braces mean?
Enclose a group of statements, such as the contents of a function.
What do opening and closing quotation marks indicate?
Enclose a string of characters, such as a message that is to be printed on the screen.
What does a semicolon indicate?
Marks the end of a complete programming statement.