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. This manipulator is used to establish a field width for the value immediately following it.
selection
setw
/n
scope resolution operator
2. The size & shape & color and weight of an object are considered
strcpy()
NULL
attributes
binary operator
3. Function ________ is used to set the random number seed to randomize a program.
Stack overflow
const
::
srand
4. The ________ enables access to a global variable with the same name as a variable in the current scope.
sorting
unary scope resolution operator (::)
allocating memory
return
5. The ________ qualifier is used to declare read-only variables.
case sensitive
const
identifiers
Sentinel
6. Used for function calls and local variables
two-dimensional
variables
stack
virtual functions
7. Program components in C++ are called functions and ________.
showpoint
&
classes
const
8. Sets floating-point values to a fixed decimal format
fixed
cin.get(ch)
virtual functions
global
9. * / % + -
Unified Modeling Language(UML)
#include directive
Arithmetic Operators
associations
10. 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
11. Every C++ program begins execution at the function _________.
n
void
main
break
12. Two slash marks ( // ) indicate __________ of a comment
overloading
beginning
globals
allocating memory
13. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.
static
preprocessor
type coercion
fixed
14. Returns the length of a string excluding the null terminator.
ofstream
strlen()
case sensitive
public
15. In inheritance the ____________ is the class the receives the inherited members.
static_cast<char>(65)
derived class
operator
operator overloading
16. Use 2 characters to represent one
access specifier
register
escape sequences
Literals
17. 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.
member
preprocessor
public
virtual functions
18. The stream insertion operator
special symbols
void pointer
<<
Default memberwise assignment
19. A function ________ enables a single function to be defined to perform a task on many different data types.
vectors
identifiers
register
template
20. 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.
information hiding
fstream
NULL
Default memberwise assignment
21. Words that are used for special purposes in a program
//
vectors
reserved words
void pointer
22. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
classes
preprocessor
register
identifiers
23. The modulus operator (%) can be used only with __________.
integer operands
cin
&
unary scope resolution operator (::)
24. The storage-class specifiers are mutable - auto - ________ - extern and static.
#include directive
register
virtual functions
scope resolution operator
25. Every C++ statement ends with a(n) _________.
<<
main
access specifier
semicolon
26. The only integer that can be assigned directly to a pointer is_____________.
before
0
attributes
operator overloading
27. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include
case sensitive
opened
dot (.)
28. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.
break
dot (.)
Unified Modeling Language(UML)
void
29. The process of placing the elements of an array in order is called ________ the array.
Literals
sorting
const datatype identifier = value
assignment
30. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
selection
Stack overflow
attributes
cin >> variable
31. The sign you use for pointers
base class
function parameters
before
*
32. The process of determining if an array contains a particular key value is called _________ the array.
access specifier
floating-point
preprocessor
searching
33. All ______ must be declared before they are used.
variables
strlen()
a.out
semantics
34. A sequence of operands and operators that describe a calculation to be performed
scope resolution operator
dot (.)
&
arithmetic expression
35. Default name of executable file
a.out
Stack overflow
classes
information hiding
36. The three values that can be used to initialize a pointer are 0 - __________ and an address.
beginning
//
NULL
base
37. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
before
function prototype
return
identifiers
38. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
//
comments
source file
return
39. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
cout
function scope
n
globals
40. This is used to mark the end of a complete C++ programming statement.
sorting
Semicolon
t
NULL
41. A ________ program executes before the compiler's translation phase begins.
*
loader
preprocessor
Stack overflow
42. C++ programs are normally typed into a computer using a(n) ________ program.
editor
>>
associations
Literals
43. A pointer is a variable that contains as its value the____________ of another variable.
address
subscript (or index)
strlen()
token
44. Classes can have relationships with other classes. These relationships are called ________.
reserve words
preprocessor
non-static
associations
45. A program that finds and attaches to your program the indicated libraries for compilation
virtual functions
*
t
preprocessor
46. Executable version of program
operator overloading
member
function overloading
object file
47. An expression that has operands with different data types
reserve words
mixed expression
inline functions
comments
48. Preprocessor directive syntax
base
#include <headerfilename>
setw
#include directive
49. tab
preprocessor
inline functions
if
t
50. Grammar rules of the language; compiler will try to identify and locate syntax errors
this
Literals
syntax
loader