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. Names of things that are used in a program - can apply to variables & constants and functions
type
continue
return
identifiers
2. Associate an identifier with a memory location
allocating memory
function call
mixed expression
object file
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.
?
Stack overflow
function call
public
4. All C++ Variables are_________.
Unified Modeling Language(UML)
source file
case sensitive
function parameters
5. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
unary operator
classes
pointer
const
6. Keyword public is a(n) _________
access specifier
pointer
if...else
//
7. A file must be ________ before data can be written to or read from it.
selection
Counter-controlled or definite
opened
assignment
8. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
type
cin >> variable
preprocessor
<<
9. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function overloading
mixed expression
classes
address
10. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
function overloading
escape sequences
classes
11. A function that calls itself
opened
setw
static_cast<char>(65)
recursive function
12. These are data items whose values do not change while the program is running
Preprocessor
Literals
whitespace
template
13. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
reserve words
char
#include
source file
14. A variable that is known only within the function in which it is defined is called a ________.
local variable
function prototype
void pointer
function scope
15. The _____ causes the contents of another file to be inserted into a program.
#include directive
syntax
Semicolon
operand value
16. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
recursive function
operator overloading
>>
fixed
17. The sign you use for references
operator
&
*
//
18. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
two-dimensional
register
base
object file
19. A function ________ enables a single function to be defined to perform a task on many different data types.
Arithmetic Operators
template
whitespace
left
20. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
assignment statement
*
switch
21. An array that uses two subscripts is referred to as a(n) _________ array.
register
assignment
two-dimensional
if...else
22. The size & shape & color and weight of an object are considered
derived class
attributes
fstream
.cpp
23. tab
const
t
register
delete
24. Used for function calls and local variables
void
inheritance
stack
classes
25. The stream insertion operator
globals
continue
<<
beginning
26. A filestream variable that represents the default output device
Arithmetic Operators
#include <headerfilename>
cout
Counter-controlled or definite
27. int namespace include using return examples of ___________
scope resolution operator
classes
selection
reserve words
28. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
mixed expression
named constant
member
two-dimensional
29. The sign you use for pointers
*
identifiers
scope
before
30. This manipulator causes the field to be left-justified with padding spaces printed to the right.
return
int values
left
#include
31. In inheritance the ____________ is the class that supplies the inherited members.
cin >> variable
function scope
non-static
base class
32. Most calculations are normally performed by ______ statements.
assignment
type casting (conversion)
unary operator
.cpp
33. A program that finds and attaches to your program the indicated libraries for compilation
int values
Stack overflow
syntax
preprocessor
34. Program components in C++ are called functions and ________.
static_cast<char>(65)
classes
static
Counter-controlled or definite
35. 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
36. Every C++ program begins execution at the function _________.
main
break
sorting
data type
37. The ________ of an identifier is the portion of the program in which the identifier can be used.
allocating memory
scope
classes
Sentinel
38. Allows the programmer to store a value in a variable
new line
initialized
assignment statement
globals
39. The process of placing the elements of an array in order is called ________ the array.
default constructor
&
sorting
before
40. You can declare default values for a function in the ____________________.
const
function overloading
function parameters
register
41. To allow file access in a program you must #include this header file.
dot (.)
fstream
token
n
42. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
searching
cin
cin >> variable
globals
43. Function ________ is used to produce random numbers.
Literals
rand
base
member
44. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
?
selection
cmath
0
45. Header file that contains commonly performed mathematical functions
cmath
&
function prototype
cin
46. 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.
/n
Default memberwise assignment
cout
special symbols
47. A variable that holds the address of another variable.
local variable
dot (.)
rand
pointer
48. If a member initializer is not provided for a member object of a class the object's __________ is called.
this
friend
data type
default constructor
49. 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
function parameters
continue
variables
50. Use 2 characters to represent one
pointer
srand
unary operator
escape sequences