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. In inheritance the ____________ is the class the receives the inherited members.
preprocessor
derived class
int values
classes
2. 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.
special symbols
recursive function
static
register
3. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
setw
#include <headerfilename>
preprocessor
pointer
4. Type casting syntax
function prototype
static_cast<char>(65)
pointer
editor
5. The storage-class specifiers are mutable - auto - ________ - extern and static.
associations
&
register
main
6. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
inline functions
register
base class
7. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
fstream
strcpy()
*
cin >> variable
8. A memory location with a name and data type - its content may be changed during program execution
variable
named constant
% modulus
whitespace
9. Sets floating-point values to a fixed decimal format
register
Preprocessor
delete
fixed
10. A program that finds and attaches to your program the indicated libraries for compilation
cout
&
NULL
preprocessor
11. This manipulator causes the field to be left-justified with padding spaces printed to the right.
named constant
classes
const
left
12. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
subscript (or index)
function parameters
&
function scope
13. This is used to mark the end of a complete C++ programming statement.
Semicolon
data type
.cpp
operand value
14. int namespace include using return examples of ___________
left
local variable
reserve words
selection
15. Most calculations are normally performed by ______ statements.
case sensitive
variables
integer operands
assignment
16. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
binary operator
fixed
Sentinel
template
17. A sequence of operands and operators that describe a calculation to be performed
variable
arithmetic expression
this
type
18. The symbol for the binary scope resolution operator
allocating memory
type casting (conversion)
::
member
19. Syntax for named constant declaration
&
preprocessor
const datatype identifier = value
fstream
20. Compares two strings and returns 0 if they are equal.
reserved words
strcmp()
integer operands
Semicolon
21. 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.
?
address
const datatype identifier = value
type coercion
22. A variable that holds the address of another variable.
polymorphism
named constant
scope resolution operator
pointer
23. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
variable
variables
token
Semicolon
24. Allows the programmer to store a value in a variable
derived class
Closing brace
assignment statement
char
25. Words that are used for special purposes in a program
reserved words
escape sequences
mixed expression
const
26. The sign you use for references
&
editor
arithmetic expression
char
27. A type of pointer that can point at objects of any data type.
const datatype identifier = value
void pointer
subscript (or index)
loader
28. The process of placing the elements of an array in order is called ________ the array.
dot (.)
strcpy()
sorting
Stack overflow
29. A function ________ enables a single function to be defined to perform a task on many different data types.
fixed
editor
template
endl (same as 'n')
30. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
definition
before
identifiers
31. Identifier or expression that is part of the calculation to be performed
0
operand value
heap
default constructor
32. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
left
sorting
default constructor
break
33. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
strcpy()
operator
fstream
34. The ________ of an identifier is the portion of the program in which the identifier can be used.
operand value
object-oriented analysis and design (OOAD)
variable
scope
35. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
recursive
escape sequences
source file
register
36. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
attributes
unary scope resolution operator (::)
break
function prototype
37. Class members specified as _________ are accessible anywhere an object of the class is in scope.
this
binary operator
public
{ }
38. Naming convention for C++ programs
{ }
.cpp
char
type coercion
39. A function is invoked with a ________.
function parameters
NULL
function call
Default memberwise assignment
40. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
Default memberwise assignment
recursive
strlen()
cin
41. 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
42. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
pointer
selection
::
base
43. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
constant variable
default constructor
return
auto
44. __________ can be used to assign an object of a class to another object of the same class.
strcpy()
pointer
Default memberwise assignment
#include directive
45. Preprocessor directive syntax
rand
cin.get(ch)
#include <headerfilename>
address
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.
static
static_cast<char>(65)
/n
floating-point
47. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
overloading
initialized
non-static
const datatype identifier = value
48. Use 2 characters to represent one
pointer
escape sequences
variable
syntax
49. A variable that is known only within the function in which it is defined is called a ________.
.cpp
local variable
strcpy()
whitespace
50. Function ________ is used to set the random number seed to randomize a program.
inline functions
#include <headerfilename>
srand
% modulus