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 memory location with a name and data type and a value - its content (value) cannot be changed during program execution
if
named constant
definition
strcpy()
2. A memory location with a name and data type - its content may be changed during program execution
function scope
editor
source file
variable
3. The process of analyzing and designing a system from an object-oriented point of view is called ________.
object-oriented analysis and design (OOAD)
showpoint
public
base class
4. Used for dynamically allocated variables
heap
Semicolon
dot (.)
recursive function
5. Grammar rules of the language; compiler will try to identify and locate syntax errors
cmath
syntax
preprocessor
virtual functions
6. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
source file
cmath
if...else
new line
7. Used for function calls and local variables
n
stack
<<
integer operands
8. Compares two strings and returns 0 if they are equal.
strcmp()
Literals
assignment statement
polymorphism
9. C++ programs are normally typed into a computer using a(n) ________ program.
scope
heap
editor
global
10. The ________ qualifier is used to declare read-only variables.
main
classes
const
semicolon
11. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
const datatype identifier = value
semicolon
n
12. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
/n
new line
definition
case sensitive
13. 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
auto
new line
#include <headerfilename>
14. Operator with only one operand
setw
before
unary operator
integer operands
15. A program that finds and attaches to your program the indicated libraries for compilation
preprocessor
srand
cin
<<
16. Nonexecutable statements that are included in a program to provide information about what the program does etc.
Counter-controlled or definite
comments
subscript (or index)
virtual functions
17. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.
operator overloading
inheritance
new line
strcmp()
18. 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
unary scope resolution operator (::)
local variable
const datatype identifier = value
19. Whole numbers - no decimals and no commas included
Semicolon
unary operator
int values
whitespace
20. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
global
information hiding
fstream
21. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
overloading
strcmp()
//
private
22. Function ________ is used to produce random numbers.
rand
fixed
static
n
23. 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.
return
virtual functions
break
endl (same as 'n')
24. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
fstream
char
editor
#include directive
25. A set of values together with a set of operations
type
data type
base
overloading
26. Lists and tables of values can be stored in arrays or __________.
beginning
vectors
.cpp
base
27. Preprocessor directive syntax
unary scope resolution operator (::)
pointer
#include <headerfilename>
beginning
28. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
member
register
static
29. Initializers __________ must be used to initialize constant members of a class.
member
default constructor
source file
named constant
30. newline
global
integer operands
prompt
n
31. Every C++ program begins execution at the function _________.
main
unary operator
access specifier
two-dimensional
32. All ______ must be declared before they are used.
variables
template
fstream
preprocessor
33. Forces the computer to display decimal point and trailing zeroes
return
object file
function overloading
showpoint
34. You can declare default values for a function in the ____________________.
function parameters
escape sequences
/n
loader
35. A filestream variable that represents the default input source
dot (.)
//
pointer
cin
36. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
operand value
variable
base class
37. __________ can be used to assign an object of a class to another object of the same class.
scope resolution operator
attributes
Default memberwise assignment
void pointer
38. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
private
this
two-dimensional
return
39. The address-of operator. it is used to assign pointers and to print the address of variables.
Default memberwise assignment
operator overloading
&
before
40. In inheritance the ____________ is the class that supplies the inherited members.
base class
globals
reserved words
{ }
41. Program components in C++ are called functions and ________.
polymorphism
new line
classes
binary operator
42. A C++ statement that makes a decision is ______.
variables
if
t
operand value
43. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
information hiding
object-oriented analysis and design (OOAD)
address
overloading
44. To allow file access in a program you must #include this header file.
fstream
reserved words
cmath
auto
45. Header file that contains commonly performed mathematical functions
this
cmath
a.out
prompt
46. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
unary operator
classes
information hiding
register
47. 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
#include
pointer
base
Default memberwise assignment
48. Executable version of program
if...else
recursive
non-static
object file
49. Creates a copy of a string.
scope
n
information hiding
strcpy()
50. The __________ operator reclaims memory previously allocated by new.
token
constant variable
unary operator
delete