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 number used to refer to a particular element of an array is called its ________.
editor
default constructor
subscript (or index)
mixed expression
2. In inheritance the ____________ is the class that supplies the inherited members.
Default memberwise assignment
return
base class
opened
3. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
inheritance
//
strlen()
4. This is used to mark the end of a complete C++ programming statement.
Semicolon
derived class
static
floating-point
5. 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
virtual functions
fstream
information hiding
6. data types that refer to numbers with decimals
polymorphism
pointer
floating-point
return
7. Lists and tables of values can be stored in arrays or __________.
reserve words
vectors
syntax
strcmp()
8. newline
address
type casting (conversion)
return
n
9. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
assignment statement
associations
srand
10. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
unary operator
char
t
return
11. Compares two strings and returns 0 if they are equal.
unary operator
n
continue
strcmp()
12. 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
13. Executable version of program
selection
delete
prompt
object file
14. When a value of one data type is implicitly (automatically) changed to another data type
Unified Modeling Language(UML)
*
type coercion
auto
15. Names of things that are used in a program - can apply to variables & constants and functions
semantics
identifiers
beginning
const
16. Preprocessor directive syntax
strcpy()
#include <headerfilename>
address
char
17. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
access specifier
*
srand
18. An operator that can only be used with int values. result will always be an int.
a.out
static
operand value
% modulus
19. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
operator
definition
variable
20. The idea that you can call the same function and the output will depend on the type of object you're using.
function call
<<
operator
polymorphism
21. The process of analyzing and designing a system from an object-oriented point of view is called ________.
srand
object-oriented analysis and design (OOAD)
preprocessor
local variable
22. A variable that holds the address of another variable.
static
pointer
unary operator
assignment statement
23. To explicitly indicate that a value is to be converted to another type
strcpy()
access specifier
type casting (conversion)
strlen()
24. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
editor
mixed expression
continue
#include
25. 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
const
?
base
type
26. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
/n
definition
strcmp()
27. Most calculations are normally performed by ______ statements.
information hiding
assignment
vectors
assignment statement
28. To allow file access in a program you must #include this header file.
fstream
dot (.)
static
cin.get(ch)
29. Keyword public is a(n) _________
left
access specifier
delete
% modulus
30. 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.
const datatype identifier = value
?
like-type expression
default constructor
31. The _________ begins the body of every function and the _________ ends the body of every function.
cin >> variable
virtual functions
identifiers
{ }
32. Every C++ statement ends with a(n) _________.
semicolon
n
delete
access specifier
33. A C++ statement that makes a decision is ______.
0
Closing brace
type casting (conversion)
if
34. Used for function calls and local variables
unary operator
stack
constant variable
two-dimensional
35. 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.
before
auto
stack
dot (.)
36. 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.
delete
information hiding
preprocessor
//
37. A sequence of operands and operators that describe a calculation to be performed
operator overloading
arithmetic expression
return
unary operator
38. The three values that can be used to initialize a pointer are 0 - __________ and an address.
function parameters
initialized
cin.get(ch)
NULL
39. Forces the computer to display decimal point and trailing zeroes
showpoint
operand value
inheritance
::
40. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
token
virtual functions
selection
const
41. Every C++ program begins execution at the function _________.
main
base
opened
allocating memory
42. The process of determining if an array contains a particular key value is called _________ the array.
searching
scope
auto
static
43. A function that can be used to read character data including whitespace
cin.get(ch)
local variable
Closing brace
case sensitive
44. Syntax for named constant declaration
recursive function
const datatype identifier = value
auto
strcpy()
45. * / % + -
Arithmetic Operators
linker
base
recursive function
46. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
main
comments
scope
Stack overflow
47. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
mixed expression
operator
non-static
48. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
showpoint
private
member
attributes
49. Naming convention for C++ programs
const
integer operands
function parameters
.cpp
50. A function is invoked with a ________.
function call
register
#include directive
&