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. newline
Closing brace
type casting (conversion)
0
n
2. All ______ must be declared before they are used.
variables
comments
setw
/n
3. The address-of operator. it is used to assign pointers and to print the address of variables.
special symbols
cin
virtual functions
&
4. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
sorting
Counter-controlled or definite
void
return
5. Default name of executable file
a.out
identifiers
Semicolon
#include
6. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
fstream
pointer
base
source file
7. Allows the programmer to store a value in a variable
Default memberwise assignment
assignment statement
void
if...else
8. An expression that has operands with different data types
register
mixed expression
template
selection
9. A memory location with a name and data type - its content may be changed during program execution
template
showpoint
identifiers
variable
10. You can declare default values for a function in the ____________________.
const datatype identifier = value
recursive
semicolon
function parameters
11. Identifier or expression that is part of the calculation to be performed
semicolon
operand value
#include directive
return
12. The symbol for the binary scope resolution operator
allocating memory
binary operator
::
new line
13. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
derived class
case sensitive
function prototype
Sentinel
14. The storage-class specifiers are mutable - auto - ________ - extern and static.
access specifier
register
static
unary scope resolution operator (::)
15. You must have a ___________ for every variable you intend to use in a program
function call
inheritance
left
definition
16. A __________ should be used to declare the size of an array because it makes the program more scalable.
assignment statement
new line
searching
constant variable
17. Used for dynamically allocated variables
heap
.cpp
setw
void
18. A function is invoked with a ________.
left
function call
subscript (or index)
this
19. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
unary operator
loader
Unified Modeling Language(UML)
like-type expression
20. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
auto
stack
global
rand
21. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
escape sequences
*
classes
function scope
22. tab
recursive function
fstream
t
variables
23. A variable that holds the address of another variable.
pointer
Sentinel
heap
strlen()
24. To allow file access in a program you must #include this header file.
fstream
showpoint
derived class
Arithmetic Operators
25. Header file that contains commonly performed mathematical functions
ofstream
cmath
recursive function
new line
26. Used for function calls and local variables
stack
source file
.cpp
Literals
27. * / % + -
Arithmetic Operators
local variable
assignment
comments
28. The __________ operator reclaims memory previously allocated by new.
operator overloading
stack
global
delete
29. A filestream variable that represents the default output device
cout
sorting
pointer
delete
30. directive A statement that starts with a # is called a ____________.
static
base
Preprocessor
rand
31. 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.
sorting
function overloading
static
?
32. __________ can be used to assign an object of a class to another object of the same class.
data type
Default memberwise assignment
switch
if
33. Operator with two operands
if...else
binary operator
token
constant variable
34. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
const
*
setw
cin >> variable
35. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
mixed expression
Semicolon
syntax
36. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
heap
new line
::
initialized
37. A type of pointer that can point at objects of any data type.
local variable
searching
srand
void pointer
38. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
identifiers
Preprocessor
const
strcmp()
39. Program components in C++ are called functions and ________.
auto
classes
register
arithmetic expression
40. The sign you use for pointers
const
beginning
Stack overflow
*
41. Symbol that denotes an action to be performed
operator
dot (.)
function call
rand
42. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.
object-oriented analysis and design (OOAD)
access specifier
scope
inheritance
43. The idea that you can call the same function and the output will depend on the type of object you're using.
static
register
const
polymorphism
44. This manipulator is used to establish a field width for the value immediately following it.
initialized
globals
delete
setw
45. Whole numbers - no decimals and no commas included
int values
cmath
auto
stack
46. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
friend
selection
operator overloading
preprocessor
47. A member function should be declared static if it does not access __________ class members.
cout
integer operands
return
non-static
48. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
scope resolution operator
pointer
beginning
token
49. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
return
prompt
Stack overflow
50. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
strcmp()
new line
function prototype