SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
C++ Programming Basics
Start Test
Study First
Subject
:
it-skills
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. A ________ program executes before the compiler's translation phase begins.
loader
preprocessor
Unified Modeling Language(UML)
Default memberwise assignment
2. Every C++ program begins execution at the function _________.
local variable
binary operator
unary scope resolution operator (::)
main
3. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.
>>
static
editor
recursive function
4. Used for function calls and local variables
stack
template
return
return
5. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
case sensitive
inline functions
base
6. The size & shape & color and weight of an object are considered
const
attributes
::
variable
7. These are data items whose values do not change while the program is running
linker
void pointer
Literals
delete
8. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
function call
reserve words
prompt
Sentinel
9. Symbol that denotes an action to be performed
operator
local variable
static_cast<char>(65)
attributes
10. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call
case sensitive
semantics
base
token
11. Whole numbers - no decimals and no commas included
prompt
#include <headerfilename>
int values
whitespace
12. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
setw
case sensitive
//
template
13. Naming convention for C++ programs
initialized
strcmp()
.cpp
?
14. Every C++ statement ends with a(n) _________.
ofstream
data type
inline functions
semicolon
15. A pointer is a variable that contains as its value the____________ of another variable.
address
unary scope resolution operator (::)
function parameters
strlen()
16. Creates a copy of a string.
like-type expression
a.out
polymorphism
strcpy()
17. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.
scope resolution operator
subscript (or index)
?
fixed
18. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
data type
Unified Modeling Language(UML)
selection
vectors
19. The number used to refer to a particular element of an array is called its ________.
public
global
if
subscript (or index)
20. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
function parameters
delete
mixed expression
21. Associate an identifier with a memory location
function prototype
identifiers
allocating memory
?
22. The stream insertion operator
cout
<<
subscript (or index)
unary operator
23. The ________ statement in a called function passes the value of an expression back to the calling function.
dot (.)
return
break
const datatype identifier = value
24. A filestream variable that represents the default input source
pointer
cin
base class
t
25. The symbol for the binary scope resolution operator
::
reserve words
>>
auto
26. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.
arithmetic expression
virtual functions
endl (same as 'n')
sorting
27. A memory location with a name and data type - its content may be changed during program execution
void
cin
searching
variable
28. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
integer operands
case sensitive
reserved words
semantics
29. A variable that is known only within the function in which it is defined is called a ________.
integer operands
<<
assignment statement
local variable
30. A program that finds and attaches to your program the indicated libraries for compilation
global
non-static
auto
preprocessor
31. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
pointer
void
private
mixed expression
32. In inheritance the ____________ is the class that supplies the inherited members.
associations
function scope
base class
cin.get(ch)
33. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
void
Closing brace
recursive function
base
34. This is used to mark the end of a complete C++ programming statement.
selection
binary operator
Semicolon
source file
35. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
named constant
#include
classes
binary operator
36. To write data to a file you define an object of which one of the following
Unified Modeling Language(UML)
strlen()
return
ofstream
37. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
cout
inline functions
classes
overloading
38. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.
const
ofstream
continue
Stack overflow
39. Use 2 characters to represent one
cout
::
escape sequences
new line
40. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
void pointer
non-static
strcmp()
41. = & | are examples of ____________.
special symbols
case sensitive
function parameters
const datatype identifier = value
42. An operator that can only be used with int values. result will always be an int.
a.out
private
% modulus
delete
43. If a member initializer is not provided for a member object of a class the object's __________ is called.
type
default constructor
prompt
0
44. A filestream variable that represents the default output device
cout
named constant
definition
unary operator
45. tab
t
non-static
token
associations
46. Lists and tables of values can be stored in arrays or __________.
binary operator
special symbols
vectors
two-dimensional
47. A function that calls itself
operand value
recursive function
cout
static_cast<char>(65)
48. A __________ should be used to declare the size of an array because it makes the program more scalable.
#include
constant variable
subscript (or index)
endl (same as 'n')
49. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
cout
derived class
new line
variable
50. All C++ Variables are_________.
sorting
case sensitive
const
editor