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. Initializers __________ must be used to initialize constant members of a class.
strcmp()
member
loader
special symbols
2. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
default constructor
return
public
3. Symbol that denotes an action to be performed
auto
operator
this
comments
4. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
function prototype
inline functions
showpoint
void
5. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
function scope
new line
globals
linker
6. Whole numbers - no decimals and no commas included
int values
polymorphism
loader
public
7. The ________ enables access to a global variable with the same name as a variable in the current scope.
Arithmetic Operators
Sentinel
unary scope resolution operator (::)
type
8. A variable declared outside any block or function is a ________ variable.
semantics
Default memberwise assignment
global
classes
9. The sign you use for references
prompt
data type
&
strcpy()
10. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
beginning
left
binary operator
new line
11. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
char
operator
constant variable
12. In inheritance the ____________ is the class the receives the inherited members.
//
derived class
Closing brace
assignment statement
13. A program that finds and attaches to your program the indicated libraries for compilation
strcpy()
auto
preprocessor
variables
14. A sequence of operands and operators that describe a calculation to be performed
arithmetic expression
switch
break
showpoint
15. To explicitly indicate that a value is to be converted to another type
local variable
global
{ }
type casting (conversion)
16. Grammar rules of the language; compiler will try to identify and locate syntax errors
{ }
assignment
t
syntax
17. Classes can have relationships with other classes. These relationships are called ________.
/n
Unified Modeling Language(UML)
void
associations
18. Words that are used for special purposes in a program
cin.get(ch)
overloading
reserved words
continue
19. Sets floating-point values to a fixed decimal format
fixed
void pointer
srand
token
20. Every C++ statement ends with a(n) _________.
semicolon
syntax
classes
srand
21. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
void
operand value
preprocessor
22. Names of things that are used in a program - can apply to variables & constants and functions
left
identifiers
overloading
static
23. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
switch
void
overloading
#include
24. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
vectors
token
#include
overloading
25. 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
source file
break
function overloading
26. The symbol for the binary scope resolution operator
::
virtual functions
sorting
if
27. Type casting syntax
Stack overflow
static_cast<char>(65)
const
linker
28. Most calculations are normally performed by ______ statements.
reserve words
const
0
assignment
29. The ________ program combines the output of the compiler with various library functions to produce an executable image.
linker
NULL
like-type expression
operator
30. A function ________ enables a single function to be defined to perform a task on many different data types.
pointer
variable
template
0
31. An operator that can only be used with int values. result will always be an int.
% modulus
vectors
delete
fixed
32. Class members specified as _________ are accessible anywhere an object of the class is in scope.
overloading
public
static
>>
33. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
n
void pointer
Stack overflow
base class
34. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function overloading
inheritance
ofstream
function scope
35. A function is invoked with a ________.
subscript (or index)
recursive function
function call
object file
36. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
pointer
function overloading
strlen()
attributes
37. Preprocessor directive syntax
new line
#include <headerfilename>
void pointer
static_cast<char>(65)
38. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
Preprocessor
searching
0
break
39. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
prompt
searching
#include
selection
40. 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
41. data types that refer to numbers with decimals
Counter-controlled or definite
non-static
floating-point
object file
42. Syntax for named constant declaration
associations
reserve words
semantics
const datatype identifier = value
43. The stream insertion operator
<<
source file
Counter-controlled or definite
vectors
44. This is used to mark the end of a complete C++ programming statement.
beginning
arithmetic expression
Semicolon
initialized
45. Default name of executable file
default constructor
a.out
searching
function overloading
46. A memory location with a name and data type - its content may be changed during program execution
function prototype
syntax
variable
type
47. 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.
register
inheritance
definition
t
48. A function that calls itself
recursive function
Counter-controlled or definite
unary scope resolution operator (::)
showpoint
49. Used for dynamically allocated variables
allocating memory
heap
char
const datatype identifier = value
50. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
linker
token
type coercion