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. Used to qualify hidden names so that they can be used.
break
static_cast<char>(65)
&
scope resolution operator
2. The symbol for the binary scope resolution operator
::
private
access specifier
Counter-controlled or definite
3. Identifier or expression that is part of the calculation to be performed
srand
like-type expression
operand value
opened
4. A set of values together with a set of operations
object-oriented analysis and design (OOAD)
function overloading
data type
NULL
5. 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
6. A file must be ________ before data can be written to or read from it.
polymorphism
ofstream
opened
const
7. A human readable file that contains C++ program
source file
left
#include
searching
8. This is used to mark the end of a complete C++ programming statement.
operator
Semicolon
operand value
classes
9. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
derived class
overloading
private
::
10. A function is invoked with a ________.
operand value
% modulus
inline functions
function call
11. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
Sentinel
scope resolution operator
char
.cpp
12. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
mixed expression
Stack overflow
token
13. A function ________ enables a single function to be defined to perform a task on many different data types.
template
continue
floating-point
sorting
14. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
Literals
special symbols
switch
integer operands
15. Header file that contains commonly performed mathematical functions
operator
virtual functions
register
cmath
16. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
integer operands
Unified Modeling Language(UML)
scope
17. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
ofstream
Default memberwise assignment
#include <headerfilename>
break
18. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.
#include <headerfilename>
source file
/n
editor
19. A type of pointer that can point at objects of any data type.
data type
vectors
void pointer
function parameters
20. The sign you use for pointers
non-static
*
function call
showpoint
21. A member function should be declared static if it does not access __________ class members.
allocating memory
non-static
operand value
like-type expression
22. Allows the programmer to store a value in a variable
vectors
template
assignment statement
polymorphism
23. Every C++ statement ends with a(n) _________.
semicolon
::
operand value
assignment
24. Used for dynamically allocated variables
heap
searching
preprocessor
type casting (conversion)
25. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
inheritance
*
int values
26. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.
cmath
?
cin.get(ch)
#include directive
27. directive A statement that starts with a # is called a ____________.
editor
Preprocessor
Literals
#include directive
28. A pointer is a variable that contains as its value the____________ of another variable.
address
binary operator
allocating memory
cmath
29. Two slash marks ( // ) indicate __________ of a comment
Preprocessor
this
integer operands
beginning
30. Executable version of program
if
semantics
cmath
object file
31. 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
subscript (or index)
Stack overflow
inheritance
32. Naming convention for C++ programs
member
dot (.)
assignment statement
.cpp
33. Message displayed to the screen asking user for input; generated with an output statement
prompt
/n
binary operator
friend
34. 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.
selection
recursive
pointer
information hiding
35. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
{ }
type casting (conversion)
type
36. Default name of executable file
inheritance
recursive function
a.out
main
37. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
scope
% modulus
inline functions
operator overloading
38. * / % + -
Unified Modeling Language(UML)
Arithmetic Operators
Semicolon
definition
39. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
token
preprocessor
base class
this
40. Every C++ program begins execution at the function _________.
main
<<
inheritance
overloading
41. The storage-class specifiers are mutable - auto - ________ - extern and static.
ofstream
void
register
operator overloading
42. The ________ of an identifier is the portion of the program in which the identifier can be used.
a.out
strlen()
before
scope
43. A function that can be used to read character data including whitespace
cin.get(ch)
const
operator
address
44. If a member initializer is not provided for a member object of a class the object's __________ is called.
<<
default constructor
>>
friend
45. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
::
#include
void
type casting (conversion)
46. The size & shape & color and weight of an object are considered
inline functions
attributes
type casting (conversion)
void
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
base
preprocessor
dot (.)
vectors
48. Function ________ is used to produce random numbers.
Preprocessor
reserve words
semicolon
rand
49. You must have a ___________ for every variable you intend to use in a program
definition
object file
break
classes
50. Returns the length of a string excluding the null terminator.
strlen()
base class
arithmetic expression
left