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. Program components in C++ are called functions and ________.
constant variable
associations
assignment statement
classes
2. Keyword public is a(n) _________
strcpy()
access specifier
fstream
Unified Modeling Language(UML)
3. Member objects are constructed __________ their enclosing class object.
private
before
escape sequences
const
4. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
char
Default memberwise assignment
definition
return
5. To allow file access in a program you must #include this header file.
fstream
scope
preprocessor
preprocessor
6. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
cin >> variable
pointer
binary operator
&
7. Classes can have relationships with other classes. These relationships are called ________.
type casting (conversion)
endl (same as 'n')
?
associations
8. 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
non-static
cmath
unary operator
9. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
variable
operator overloading
initialized
10. Every C++ statement ends with a(n) _________.
semicolon
NULL
named constant
access specifier
11. The process of determining if an array contains a particular key value is called _________ the array.
auto
assignment
searching
0
12. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
unary scope resolution operator (::)
void
syntax
const
13. Names of things that are used in a program - can apply to variables & constants and functions
&
recursive function
assignment
identifiers
14. Characters used to separate symbols or reserved words or identifiers and statements
heap
arithmetic expression
n
whitespace
15. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
special symbols
main
cmath
Stack overflow
16. The only integer that can be assigned directly to a pointer is_____________.
assignment statement
preprocessor
unary scope resolution operator (::)
0
17. The address-of operator. it is used to assign pointers and to print the address of variables.
&
loader
Unified Modeling Language(UML)
cout
18. A function that calls itself
type coercion
assignment statement
?
recursive function
19. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
auto
register
delete
char
20. Use 2 characters to represent one
data type
*
inheritance
escape sequences
21. A sequence of operands and operators that describe a calculation to be performed
arithmetic expression
pointer
new line
NULL
22. Preprocessor directive syntax
cin.get(ch)
void
#include <headerfilename>
base class
23. Class members specified as _________ are accessible anywhere an object of the class is in scope.
return
recursive
public
switch
24. A filestream variable that represents the default input source
base
recursive
Unified Modeling Language(UML)
cin
25. To explicitly indicate that a value is to be converted to another type
cmath
type casting (conversion)
switch
const
26. The __________ operator reclaims memory previously allocated by new.
base
delete
classes
assignment
27. The stream extraction operator
static
>>
editor
fixed
28. Two slash marks ( // ) indicate __________ of a comment
static
constant variable
beginning
#include <headerfilename>
29. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
pointer
/n
stack
function overloading
30. The storage-class specifiers are mutable - auto - ________ - extern and static.
attributes
selection
register
globals
31. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
Literals
function prototype
preprocessor
mixed expression
32. The symbol for the binary scope resolution operator
default constructor
::
base class
unary scope resolution operator (::)
33. Symbol that denotes an action to be performed
access specifier
operator
definition
*
34. A function is invoked with a ________.
function call
constant variable
function scope
Arithmetic Operators
35. 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.
inheritance
Sentinel
operator
binary operator
36. 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
37. A set of values together with a set of operations
information hiding
type coercion
::
data type
38. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
type casting (conversion)
Unified Modeling Language(UML)
escape sequences
return
39. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
t
selection
friend
0
40. 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
derived class
member
type
41. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
comments
private
attributes
opened
42. A function that can be used to read character data including whitespace
cin.get(ch)
#include
function parameters
const
43. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
object file
cin >> variable
Preprocessor
constant variable
44. You must have a ___________ for every variable you intend to use in a program
opened
default constructor
definition
reserved words
45. The sign you use for references
char
register
&
cout
46. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
constant variable
static
function scope
a.out
47. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
token
::
cin.get(ch)
like-type expression
48. Returns the length of a string excluding the null terminator.
if
strlen()
ofstream
unary operator
49. Message displayed to the screen asking user for input; generated with an output statement
semantics
member
recursive
prompt
50. Type casting syntax
static_cast<char>(65)
&
polymorphism
ofstream