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. You can declare default values for a function in the ____________________.
opened
left
char
function parameters
2. A file must be ________ before data can be written to or read from it.
local variable
Literals
return
opened
3. Program components in C++ are called functions and ________.
classes
definition
const datatype identifier = value
private
4. To explicitly indicate that a value is to be converted to another type
mixed expression
char
Stack overflow
type casting (conversion)
5. Operator with only one operand
ofstream
rand
variable
unary operator
6. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
dot (.)
classes
prompt
7. Nonexecutable statements that are included in a program to provide information about what the program does etc.
attributes
definition
comments
source file
8. int namespace include using return examples of ___________
searching
data type
type casting (conversion)
reserve words
9. An expression in which all operands have the same data type - result will have the same data type as operands
Counter-controlled or definite
preprocessor
polymorphism
like-type expression
10. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
preprocessor
default constructor
associations
switch
11. Whole numbers - no decimals and no commas included
const datatype identifier = value
const
int values
::
12. Naming convention for C++ programs
variable
//
beginning
.cpp
13. This is used to mark the end of a complete C++ programming statement.
Semicolon
scope
type coercion
template
14. Words that are used for special purposes in a program
unary scope resolution operator (::)
template
reserved words
attributes
15. Names of things that are used in a program - can apply to variables & constants and functions
operator
identifiers
NULL
recursive function
16. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.
Preprocessor
/n
base
preprocessor
17. The stream extraction operator
{ }
reserve words
>>
t
18. Header file that contains commonly performed mathematical functions
overloading
assignment statement
static_cast<char>(65)
cmath
19. = & | are examples of ____________.
assignment statement
global
special symbols
n
20. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
unary operator
auto
member
dot (.)
21. data types that refer to numbers with decimals
data type
break
floating-point
cmath
22. A variable that is known only within the function in which it is defined is called a ________.
local variable
fixed
globals
type coercion
23. Executable version of program
stack
dot (.)
object file
register
24. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
NULL
#include
endl (same as 'n')
before
25. Initializers __________ must be used to initialize constant members of a class.
before
member
operand value
0
26. The size & shape & color and weight of an object are considered
base class
private
searching
attributes
27. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
inline functions
char
pointer
//
28. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
cmath
endl (same as 'n')
token
/n
29. A pointer is a variable that contains as its value the____________ of another variable.
Semicolon
address
like-type expression
virtual functions
30. Type casting syntax
cin
data type
static_cast<char>(65)
whitespace
31. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
derived class
inline functions
if
32. The storage-class specifiers are mutable - auto - ________ - extern and static.
function scope
?
semantics
register
33. The process of placing the elements of an array in order is called ________ the array.
sorting
if...else
token
Counter-controlled or definite
34. Class members specified as _________ are accessible anywhere an object of the class is in scope.
address
associations
type
public
35. A __________ data member represents class-wide information.
member
static
object-oriented analysis and design (OOAD)
assignment statement
36. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
named constant
new line
&
binary operator
37. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
strcmp()
named constant
void
classes
38. tab
cin.get(ch)
t
register
strlen()
39. The ________ program transfers the executable image of a C++ program from disk to memory.
sorting
function overloading
preprocessor
loader
40. The ________ program combines the output of the compiler with various library functions to produce an executable image.
::
linker
static_cast<char>(65)
if...else
41. A C++ statement that makes a decision is ______.
if
classes
cin.get(ch)
&
42. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
assignment statement
type casting (conversion)
public
43. Preprocessor directive syntax
overloading
this
#include <headerfilename>
new line
44. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
break
void
left
searching
45. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
reserve words
left
*
recursive
46. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
mixed expression
left
t
47. To allow file access in a program you must #include this header file.
operator
Default memberwise assignment
if
fstream
48. Function ________ is used to set the random number seed to randomize a program.
delete
virtual functions
function call
srand
49. 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.
binary operator
virtual functions
register
&
50. The three values that can be used to initialize a pointer are 0 - __________ and an address.
member
Semicolon
NULL
function overloading