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. The idea that you can call the same function and the output will depend on the type of object you're using.
strcmp()
initialized
sorting
polymorphism
2. This manipulator causes the field to be left-justified with padding spaces printed to the right.
constant variable
left
attributes
identifiers
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
recursive
source file
unary operator
4. The size & shape & color and weight of an object are considered
private
stack
overloading
attributes
5. A variable that holds the address of another variable.
pointer
globals
polymorphism
recursive
6. Lists and tables of values can be stored in arrays or __________.
binary operator
vectors
private
Literals
7. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
const
attributes
?
preprocessor
8. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
loader
&
Counter-controlled or definite
9. Creates a copy of a string.
strcpy()
initialized
strlen()
cin.get(ch)
10. Names of things that are used in a program - can apply to variables & constants and functions
if
const
object-oriented analysis and design (OOAD)
identifiers
11. Classes can have relationships with other classes. These relationships are called ________.
associations
heap
template
inline functions
12. int namespace include using return examples of ___________
reserve words
constant variable
#include <headerfilename>
semicolon
13. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
access specifier
opened
variables
14. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
two-dimensional
global
prompt
15. Words that are used for special purposes in a program
reserved words
base class
floating-point
void
16. All ______ must be declared before they are used.
a.out
case sensitive
variables
void pointer
17. A C++ statement that makes a decision is ______.
setw
if
subscript (or index)
switch
18. 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
#include directive
loader
void
19. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
::
function prototype
strcpy()
assignment
20. The _____ causes the contents of another file to be inserted into a program.
linker
#include directive
escape sequences
base class
21. = & | are examples of ____________.
special symbols
overloading
void
variable
22. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
token
if...else
char
floating-point
23. This manipulator is used to establish a field width for the value immediately following it.
{ }
setw
cin >> variable
reserved words
24. The process of analyzing and designing a system from an object-oriented point of view is called ________.
assignment
object-oriented analysis and design (OOAD)
address
type
25. The only integer that can be assigned directly to a pointer is_____________.
fstream
0
register
non-static
26. All C++ Variables are_________.
delete
case sensitive
friend
operand value
27. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
pointer
type casting (conversion)
Arithmetic Operators
28. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
strlen()
operator
.cpp
semantics
29. A function ________ enables a single function to be defined to perform a task on many different data types.
register
#include directive
variable
template
30. A type of pointer that can point at objects of any data type.
if
floating-point
void pointer
public
31. Class members specified as _________ are accessible anywhere an object of the class is in scope.
assignment statement
public
whitespace
getline
32. A set of values together with a set of operations
mixed expression
pointer
data type
register
33. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
register
reserve words
case sensitive
34. Associate an identifier with a memory location
allocating memory
cin.get(ch)
left
subscript (or index)
35. A function is invoked with a ________.
function call
attributes
void pointer
/n
36. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
subscript (or index)
return
syntax
attributes
37. The ________ program transfers the executable image of a C++ program from disk to memory.
overloading
loader
type casting (conversion)
vectors
38. The ________ program combines the output of the compiler with various library functions to produce an executable image.
assignment statement
before
type casting (conversion)
linker
39. Type casting syntax
two-dimensional
n
function prototype
static_cast<char>(65)
40. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
return
{ }
recursive
41. data types that refer to numbers with decimals
object file
floating-point
auto
unary operator
42. The ________ qualifier is used to declare read-only variables.
Default memberwise assignment
const
strlen()
void pointer
43. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
data type
recursive
member
return
44. The process of placing the elements of an array in order is called ________ the array.
beginning
inheritance
allocating memory
sorting
45. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
inline functions
?
default constructor
46. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
whitespace
operator
function scope
break
47. Header file that contains commonly performed mathematical functions
base class
cmath
reserved words
const datatype identifier = value
48. A function that calls itself
linker
if
recursive function
allocating memory
49. Syntax for named constant declaration
const datatype identifier = value
srand
#include <headerfilename>
if
50. 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.
continue
definition
pointer
?