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. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
reserved words
return
type coercion
floating-point
2. The modulus operator (%) can be used only with __________.
integer operands
comments
auto
return
3. Characters used to separate symbols or reserved words or identifiers and statements
type coercion
template
whitespace
global
4. A file must be ________ before data can be written to or read from it.
data type
opened
{ }
constant variable
5. Every C++ statement ends with a(n) _________.
semicolon
&
pointer
function scope
6. Syntax for named constant declaration
integer operands
const datatype identifier = value
cin
new line
7. A function ________ enables a single function to be defined to perform a task on many different data types.
/n
pointer
template
strcmp()
8. Whole numbers - no decimals and no commas included
int values
.cpp
special symbols
object file
9. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
return
recursive
source file
.cpp
10. Preprocessor directive syntax
function call
if
#include <headerfilename>
semicolon
11. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
overloading
floating-point
pointer
classes
12. Operator with two operands
binary operator
auto
0
setw
13. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
this
Closing brace
setw
void
14. Member objects are constructed __________ their enclosing class object.
information hiding
stack
whitespace
before
15. Used for dynamically allocated variables
information hiding
heap
cin >> variable
subscript (or index)
16. The idea that you can call the same function and the output will depend on the type of object you're using.
static_cast<char>(65)
polymorphism
register
cin
17. All C++ Variables are_________.
auto
case sensitive
% modulus
<<
18. 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.
operand value
inheritance
pointer
case sensitive
19. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
private
break
register
20. tab
allocating memory
t
function scope
public
21. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
0
Stack overflow
associations
attributes
22. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
operand value
non-static
arithmetic expression
23. Forces the computer to display decimal point and trailing zeroes
source file
strcpy()
vectors
showpoint
24. A variable that holds the address of another variable.
before
strlen()
whitespace
pointer
25. An array that uses two subscripts is referred to as a(n) _________ array.
variables
0
two-dimensional
if...else
26. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
token
function prototype
non-static
.cpp
27. All ______ must be declared before they are used.
identifiers
variables
sorting
#include directive
28. A function that can be used to read character data including whitespace
allocating memory
data type
cin.get(ch)
void pointer
29. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
token
main
showpoint
30. A memory location with a name and data type - its content may be changed during program execution
variable
attributes
semantics
fixed
31. 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.
member
static
void
mixed expression
32. The ________ qualifier is used to declare read-only variables.
virtual functions
#include <headerfilename>
const
Stack overflow
33. The process of placing the elements of an array in order is called ________ the array.
assignment
sorting
derived class
polymorphism
34. 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
const datatype identifier = value
?
35. You must have a ___________ for every variable you intend to use in a program
definition
semantics
function parameters
recursive function
36. The ________ of an identifier is the portion of the program in which the identifier can be used.
scope
NULL
Stack overflow
whitespace
37. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
vectors
variable
.cpp
38. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
//
static
Semicolon
39. int namespace include using return examples of ___________
floating-point
sorting
reserve words
assignment statement
40. 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
polymorphism
public
local variable
41. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
information hiding
floating-point
allocating memory
42. A function that calls itself
function call
polymorphism
recursive function
register
43. In inheritance the ____________ is the class that supplies the inherited members.
left
base class
template
cin >> variable
44. __________ can be used to assign an object of a class to another object of the same class.
{ }
static_cast<char>(65)
vectors
Default memberwise assignment
45. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
base class
//
default constructor
*
46. Type casting syntax
this
type casting (conversion)
preprocessor
static_cast<char>(65)
47. Program components in C++ are called functions and ________.
non-static
searching
classes
polymorphism
48. Executable version of program
heap
if...else
object file
cmath
49. 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.
cin
assignment statement
dot (.)
constant variable
50. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
::
private
operator
scope resolution operator