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. Compares two strings and returns 0 if they are equal.
selection
strcmp()
continue
recursive
2. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
information hiding
private
scope resolution operator
polymorphism
3. All ______ must be declared before they are used.
#include <headerfilename>
variables
before
t
4. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
showpoint
register
base class
5. Naming convention for C++ programs
searching
0
.cpp
left
6. The number used to refer to a particular element of an array is called its ________.
definition
subscript (or index)
derived class
non-static
7. 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
pointer
base
stack
friend
8. Identifier or expression that is part of the calculation to be performed
operand value
const
void
recursive
9. 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.
register
global
main
/n
10. Message displayed to the screen asking user for input; generated with an output statement
main
srand
prompt
function call
11. Use 2 characters to represent one
escape sequences
rand
attributes
void
12. 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.
virtual functions
polymorphism
recursive function
srand
13. You must have a ___________ for every variable you intend to use in a program
function scope
access specifier
constant variable
definition
14. Symbol that denotes an action to be performed
binary operator
operator
sorting
subscript (or index)
15. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
recursive
delete
integer operands
16. Every C++ statement ends with a(n) _________.
Preprocessor
register
semicolon
editor
17. Program components in C++ are called functions and ________.
#include
classes
static_cast<char>(65)
const
18. Repeating a set of instructions a specific number of times is called_________repetition.
% modulus
cmath
object-oriented analysis and design (OOAD)
Counter-controlled or definite
19. An expression in which all operands have the same data type - result will have the same data type as operands
semicolon
like-type expression
scope resolution operator
Closing brace
20. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
template
prompt
polymorphism
switch
21. The idea that you can call the same function and the output will depend on the type of object you're using.
preprocessor
strlen()
polymorphism
function parameters
22. The storage-class specifiers are mutable - auto - ________ - extern and static.
beginning
arithmetic expression
register
mixed expression
23. A variable declared outside any block or function is a ________ variable.
global
{ }
globals
operator overloading
24. The process of determining if an array contains a particular key value is called _________ the array.
whitespace
searching
{ }
Semicolon
25. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
non-static
overloading
getline
Unified Modeling Language(UML)
26. Type casting syntax
strlen()
like-type expression
stack
static_cast<char>(65)
27. Used for dynamically allocated variables
heap
semantics
register
object-oriented analysis and design (OOAD)
28. A memory location with a name and data type - its content may be changed during program execution
address
new line
variable
semicolon
29. In inheritance the ____________ is the class the receives the inherited members.
{ }
derived class
preprocessor
reserve words
30. Characters used to separate symbols or reserved words or identifiers and statements
delete
if...else
whitespace
static_cast<char>(65)
31. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
srand
inline functions
fstream
classes
32. You can declare default values for a function in the ____________________.
void
function parameters
0
non-static
33. Names of things that are used in a program - can apply to variables & constants and functions
arithmetic expression
named constant
identifiers
pointer
34. Every C++ program begins execution at the function _________.
type
non-static
friend
main
35. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
prompt
sorting
named constant
void
36. The three values that can be used to initialize a pointer are 0 - __________ and an address.
recursive function
polymorphism
NULL
auto
37. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
rand
new line
case sensitive
//
38. For every opening brace in a C++ program there must be a ______________.
allocating memory
escape sequences
Closing brace
associations
39. The ________ program combines the output of the compiler with various library functions to produce an executable image.
void
Literals
linker
cin
40. Used to qualify hidden names so that they can be used.
scope resolution operator
reserved words
whitespace
strcpy()
41. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
scope
auto
preprocessor
member
42. Words that are used for special purposes in a program
new line
Unified Modeling Language(UML)
loader
reserved words
43. 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 scope resolution operator (::)
?
void pointer
44. The ________ qualifier is used to declare read-only variables.
beginning
Counter-controlled or definite
const
unary operator
45. A function ________ enables a single function to be defined to perform a task on many different data types.
function parameters
auto
template
editor
46. A set of values together with a set of operations
semicolon
data type
variable
vectors
47. The sign you use for pointers
*
classes
two-dimensional
<<
48. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
if...else
opened
initialized
recursive function
49. Preprocessor directive syntax
n
sorting
#include <headerfilename>
0
50. Two slash marks ( // ) indicate __________ of a comment
beginning
Unified Modeling Language(UML)
recursive function
two-dimensional