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. Words that are used for special purposes in a program
like-type expression
register
reserved words
object-oriented analysis and design (OOAD)
2. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
constant variable
reserve words
subscript (or index)
3. Every C++ statement ends with a(n) _________.
scope
semicolon
sorting
return
4. The symbol for the binary scope resolution operator
::
arithmetic expression
#include
special symbols
5. A function that calls itself
global
recursive function
comments
heap
6. 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.
operator overloading
Literals
virtual functions
.cpp
7. A __________ should be used to declare the size of an array because it makes the program more scalable.
cout
<<
constant variable
before
8. A function is invoked with a ________.
function call
strlen()
new line
strcpy()
9. The stream insertion operator
<<
member
Stack overflow
comments
10. The ________ program transfers the executable image of a C++ program from disk to memory.
sorting
pointer
function scope
loader
11. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
semantics
continue
friend
12. 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.
assignment statement
inline functions
constant variable
inheritance
13. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
reserved words
<<
getline
14. A human readable file that contains C++ program
source file
char
information hiding
recursive function
15. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
Counter-controlled or definite
reserved words
this
char
16. The ________ of an identifier is the portion of the program in which the identifier can be used.
friend
scope
type coercion
Sentinel
17. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
function overloading
named constant
t
global
18. Class members specified as _________ are accessible anywhere an object of the class is in scope.
a.out
operand value
special symbols
public
19. The ________ qualifier is used to declare read-only variables.
stack
const
register
globals
20. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
virtual functions
dot (.)
&
function scope
21. Header file that contains commonly performed mathematical functions
void
cmath
const datatype identifier = value
auto
22. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.
mixed expression
//
information hiding
cmath
23. Naming convention for C++ programs
unary operator
n
.cpp
left
24. Operator with only one operand
getline
unary operator
fixed
vectors
25. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
source file
cmath
function overloading
reserve words
26. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
27. You must have a ___________ for every variable you intend to use in a program
definition
escape sequences
if
char
28. The ________ enables access to a global variable with the same name as a variable in the current scope.
loader
virtual functions
unary scope resolution operator (::)
selection
29. An expression that has operands with different data types
Counter-controlled or definite
mixed expression
{ }
t
30. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
classes
return
static_cast<char>(65)
this
31. The elements of an array are related by the fact that they have the same name and ___________.
int values
vectors
const
type
32. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
break
recursive function
::
object-oriented analysis and design (OOAD)
33. Function ________ is used to produce random numbers.
rand
ofstream
/n
{ }
34. Most calculations are normally performed by ______ statements.
void pointer
floating-point
assignment
Literals
35. 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
//
inheritance
base
Closing brace
36. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
default constructor
cin >> variable
two-dimensional
NULL
37. Classes can have relationships with other classes. These relationships are called ________.
associations
this
derived class
loader
38. Symbol that denotes an action to be performed
operator
scope resolution operator
delete
pointer
39. A file must be ________ before data can be written to or read from it.
object-oriented analysis and design (OOAD)
opened
const
char
40. This is used to mark the end of a complete C++ programming statement.
if
&
Semicolon
integer operands
41. In inheritance the ____________ is the class the receives the inherited members.
derived class
continue
static_cast<char>(65)
variables
42. When a value of one data type is implicitly (automatically) changed to another data type
#include
type coercion
scope resolution operator
auto
43. All C++ Variables are_________.
cmath
case sensitive
Literals
public
44. The three values that can be used to initialize a pointer are 0 - __________ and an address.
polymorphism
Literals
NULL
<<
45. Characters used to separate symbols or reserved words or identifiers and statements
const datatype identifier = value
editor
whitespace
source file
46. Executable version of program
object file
function prototype
register
Literals
47. A memory location with a name and data type - its content may be changed during program execution
vectors
variable
function overloading
char
48. The _____ causes the contents of another file to be inserted into a program.
strcmp()
assignment
recursive
#include directive
49. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
semantics
cin.get(ch)
srand
50. Grammar rules of the language; compiler will try to identify and locate syntax errors
definition
t
pointer
syntax