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. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
int values
semantics
Default memberwise assignment
const
2. Identifier or expression that is part of the calculation to be performed
operand value
auto
strcmp()
globals
3. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
function parameters
inheritance
data type
getline
4. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function overloading
static_cast<char>(65)
fixed
*
5. Executable version of program
object file
polymorphism
recursive
>>
6. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
main
switch
named constant
7. The __________ operator reclaims memory previously allocated by new.
switch
delete
new line
Unified Modeling Language(UML)
8. In inheritance the ____________ is the class that supplies the inherited members.
base class
showpoint
//
semantics
9. An expression that has operands with different data types
mixed expression
cin >> variable
attributes
/n
10. Keyword public is a(n) _________
linker
access specifier
editor
attributes
11. A pointer is a variable that contains as its value the____________ of another variable.
loader
token
unary operator
address
12. These are data items whose values do not change while the program is running
if...else
identifiers
token
Literals
13. The _________ begins the body of every function and the _________ ends the body of every function.
mixed expression
srand
assignment statement
{ }
14. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.
/n
two-dimensional
function scope
template
15. Associate an identifier with a memory location
allocating memory
scope resolution operator
recursive
type
16. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
inheritance
mixed expression
cin >> variable
char
17. Every C++ statement ends with a(n) _________.
semicolon
char
integer operands
attributes
18. Use 2 characters to represent one
unary scope resolution operator (::)
Preprocessor
escape sequences
semantics
19. The sign you use for pointers
ofstream
unary operator
assignment statement
*
20. The sign you use for references
% modulus
Default memberwise assignment
object file
&
21. Function ________ is used to set the random number seed to randomize a program.
*
srand
showpoint
unary scope resolution operator (::)
22. int namespace include using return examples of ___________
reserve words
two-dimensional
switch
base class
23. You must have a ___________ for every variable you intend to use in a program
pointer
semantics
if
definition
24. Allows the programmer to store a value in a variable
local variable
assignment statement
loader
pointer
25. All ______ must be declared before they are used.
% modulus
variables
initialized
data type
26. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
local variable
inline functions
scope
subscript (or index)
27. A human readable file that contains C++ program
like-type expression
subscript (or index)
attributes
source file
28. A function that calls itself
pointer
recursive function
global
rand
29. You can declare default values for a function in the ____________________.
dot (.)
function parameters
return
prompt
30. The symbol for the binary scope resolution operator
continue
::
unary operator
/n
31. A function is invoked with a ________.
cin.get(ch)
Semicolon
function call
inline functions
32. 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
static
base
mixed expression
cmath
33. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
function prototype
globals
.cpp
34. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
editor
derived class
Literals
35. A C++ statement that makes a decision is ______.
if
mixed expression
//
information hiding
36. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
arithmetic expression
switch
heap
auto
37. Used for function calls and local variables
stack
syntax
public
reserved words
38. Program components in C++ are called functions and ________.
base class
classes
n
binary operator
39. In inheritance the ____________ is the class the receives the inherited members.
derived class
variables
continue
0
40. 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.
polymorphism
::
cin
virtual functions
41. newline
showpoint
scope resolution operator
function overloading
n
42. An array that uses two subscripts is referred to as a(n) _________ array.
inline functions
function prototype
two-dimensional
address
43. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
binary operator
switch
void
subscript (or index)
44. A variable that is known only within the function in which it is defined is called a ________.
local variable
dot (.)
loader
allocating memory
45. 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.
?
unary operator
local variable
integer operands
46. directive A statement that starts with a # is called a ____________.
this
initialized
Preprocessor
associations
47. Function ________ is used to produce random numbers.
globals
if
rand
default constructor
48. Creates a copy of a string.
this
switch
function overloading
strcpy()
49. The ________ of an identifier is the portion of the program in which the identifier can be used.
heap
selection
pointer
scope
50. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.
friend
constant variable
prompt
dot (.)