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. Most calculations are normally performed by ______ statements.
assignment
variables
token
?
2. Every C++ statement ends with a(n) _________.
semicolon
function overloading
data type
searching
3. 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.
global
*
?
delete
4. Syntax for named constant declaration
<<
access specifier
const datatype identifier = value
?
5. int namespace include using return examples of ___________
main
void pointer
globals
reserve words
6. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
cmath
constant variable
if
7. Lists and tables of values can be stored in arrays or __________.
template
unary scope resolution operator (::)
Default memberwise assignment
vectors
8. This manipulator causes the field to be left-justified with padding spaces printed to the right.
continue
cout
left
cmath
9. Classes can have relationships with other classes. These relationships are called ________.
associations
escape sequences
address
cout
10. A pointer is a variable that contains as its value the____________ of another variable.
strlen()
static
this
address
11. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.
continue
cmath
cout
switch
12. Function ________ is used to set the random number seed to randomize a program.
NULL
object-oriented analysis and design (OOAD)
beginning
srand
13. Operator with only one operand
//
&
unary operator
sorting
14. Two slash marks ( // ) indicate __________ of a comment
beginning
void
prompt
constant variable
15. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
classes
public
break
16. __________ can be used to assign an object of a class to another object of the same class.
Default memberwise assignment
if...else
escape sequences
function scope
17. The ________ qualifier is used to declare read-only variables.
this
&
scope resolution operator
const
18. C++ programs are normally typed into a computer using a(n) ________ program.
globals
editor
preprocessor
sorting
19. Class members specified as _________ are accessible anywhere an object of the class is in scope.
<<
reserve words
type
public
20. The sign you use for references
const
operand value
&
derived class
21. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
static_cast<char>(65)
function overloading
prompt
mixed expression
22. The size & shape & color and weight of an object are considered
this
initialized
attributes
unary scope resolution operator (::)
23. To write data to a file you define an object of which one of the following
associations
#include directive
static
ofstream
24. 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
assignment
searching
continue
25. A __________ data member represents class-wide information.
type coercion
static
prompt
void
26. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
overloading
reserved words
derived class
Unified Modeling Language(UML)
27. Used to qualify hidden names so that they can be used.
base
scope resolution operator
#include
fstream
28. This manipulator is used to establish a field width for the value immediately following it.
inheritance
private
const datatype identifier = value
setw
29. You must have a ___________ for every variable you intend to use in a program
definition
identifiers
cout
return
30. Every C++ program begins execution at the function _________.
preprocessor
object-oriented analysis and design (OOAD)
Preprocessor
main
31. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function overloading
if
heap
function prototype
32. newline
Unified Modeling Language(UML)
two-dimensional
unary scope resolution operator (::)
n
33. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
classes
derived class
base class
binary operator
34. 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
35. You can declare default values for a function in the ____________________.
int values
Sentinel
void
function parameters
36. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
preprocessor
cin.get(ch)
switch
initialized
37. A function ________ enables a single function to be defined to perform a task on many different data types.
inheritance
linker
strlen()
template
38. Executable version of program
function call
Preprocessor
preprocessor
object file
39. Identifier or expression that is part of the calculation to be performed
operand value
base
endl (same as 'n')
{ }
40. A filestream variable that represents the default input source
scope
operator overloading
cin
linker
41. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
static
main
const
cin >> variable
42. An expression in which all operands have the same data type - result will have the same data type as operands
0
like-type expression
stack
editor
43. The elements of an array are related by the fact that they have the same name and ___________.
left
scope resolution operator
type
getline
44. Header file that contains commonly performed mathematical functions
two-dimensional
heap
cmath
//
45. A program that finds and attaches to your program the indicated libraries for compilation
global
preprocessor
.cpp
allocating memory
46. 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.
inheritance
dot (.)
Closing brace
operand value
47. Creates a copy of a string.
editor
access specifier
strcpy()
int values
48. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
variables
selection
non-static
static
49. 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.
identifiers
case sensitive
main
information hiding
50. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
named constant
loader
getline