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 elements of an array are related by the fact that they have the same name and ___________.
type
::
local variable
function overloading
2. The stream insertion operator
<<
this
void
static
3. Two slash marks ( // ) indicate __________ of a comment
beginning
Stack overflow
cout
delete
4. The sign you use for references
associations
Sentinel
&
type coercion
5. Forces the computer to display decimal point and trailing zeroes
cmath
floating-point
showpoint
if...else
6. The _____ causes the contents of another file to be inserted into a program.
Default memberwise assignment
#include directive
pointer
inheritance
7. A __________ should be used to declare the size of an array because it makes the program more scalable.
static
linker
/n
constant variable
8. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
classes
overloading
function scope
type coercion
9. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
void
global
Semicolon
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. This is used to mark the end of a complete C++ programming statement.
object-oriented analysis and design (OOAD)
derived class
Semicolon
unary scope resolution operator (::)
12. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
whitespace
switch
assignment
strcpy()
13. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
linker
scope
object file
cin >> variable
14. The ________ of an identifier is the portion of the program in which the identifier can be used.
scope
0
*
beginning
15. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
<<
?
//
strlen()
16. * / % + -
like-type expression
type
Semicolon
Arithmetic Operators
17. 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
object file
cin
associations
18. Syntax for named constant declaration
endl (same as 'n')
inheritance
default constructor
const datatype identifier = value
19. The three values that can be used to initialize a pointer are 0 - __________ and an address.
stack
operator
NULL
return
20. The _________ begins the body of every function and the _________ ends the body of every function.
base
int values
function prototype
{ }
21. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
Semicolon
operand value
srand
22. The size & shape & color and weight of an object are considered
special symbols
>>
{ }
attributes
23. A function ________ enables a single function to be defined to perform a task on many different data types.
void
comments
two-dimensional
template
24. Returns the length of a string excluding the null terminator.
strlen()
selection
pointer
% modulus
25. If a member initializer is not provided for a member object of a class the object's __________ is called.
function parameters
srand
void pointer
default constructor
26. The process of analyzing and designing a system from an object-oriented point of view is called ________.
rand
>>
cout
object-oriented analysis and design (OOAD)
27. Most calculations are normally performed by ______ statements.
polymorphism
assignment
identifiers
srand
28. Naming convention for C++ programs
whitespace
classes
address
.cpp
29. A function is invoked with a ________.
function call
private
globals
strcmp()
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
main
classes
31. The modulus operator (%) can be used only with __________.
integer operands
left
inline functions
strcpy()
32. An operator that can only be used with int values. result will always be an int.
&
% modulus
public
whitespace
33. The symbol for the binary scope resolution operator
::
local variable
void pointer
static
34. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
const
void pointer
Stack overflow
35. The address-of operator. it is used to assign pointers and to print the address of variables.
strlen()
&
stack
opened
36. Function ________ is used to set the random number seed to randomize a program.
srand
if
?
{ }
37. Executable version of program
non-static
loader
new line
object file
38. A set of values together with a set of operations
arithmetic expression
syntax
binary operator
data type
39. Classes can have relationships with other classes. These relationships are called ________.
function prototype
associations
type
ofstream
40. The stream extraction operator
::
>>
syntax
template
41. In inheritance the ____________ is the class the receives the inherited members.
t
semantics
derived class
static
42. Allows the programmer to store a value in a variable
type
showpoint
assignment statement
recursive function
43. Message displayed to the screen asking user for input; generated with an output statement
prompt
scope
cin
endl (same as 'n')
44. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
::
function parameters
auto
srand
45. Used to qualify hidden names so that they can be used.
opened
arithmetic expression
scope resolution operator
constant variable
46. The ________ qualifier is used to declare read-only variables.
function parameters
const
whitespace
selection
47. int namespace include using return examples of ___________
Unified Modeling Language(UML)
scope resolution operator
reserve words
Closing brace
48. A human readable file that contains C++ program
comments
source file
>>
cout
49. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
reserved words
recursive
function prototype
fstream
50. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
sorting
left
inline functions