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. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
classes
semantics
syntax
new line
2. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
globals
object-oriented analysis and design (OOAD)
void
3. The storage-class specifiers are mutable - auto - ________ - extern and static.
base class
a.out
type
register
4. Classes can have relationships with other classes. These relationships are called ________.
function parameters
associations
preprocessor
special symbols
5. Used for function calls and local variables
static
Closing brace
non-static
stack
6. A pointer is a variable that contains as its value the____________ of another variable.
% modulus
constant variable
attributes
address
7. A function ________ enables a single function to be defined to perform a task on many different data types.
dot (.)
local variable
member
template
8. = & | are examples of ____________.
special symbols
cin.get(ch)
base class
% modulus
9. When a value of one data type is implicitly (automatically) changed to another data type
default constructor
type coercion
heap
% modulus
10. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
virtual functions
/n
static
11. Associate an identifier with a memory location
cmath
allocating memory
default constructor
unary operator
12. A __________ data member represents class-wide information.
public
default constructor
static
*
13. The number used to refer to a particular element of an array is called its ________.
special symbols
searching
public
subscript (or index)
14. The sign you use for pointers
#include
void
escape sequences
*
15. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
static
mixed expression
Stack overflow
16. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
constant variable
#include
semantics
like-type expression
17. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
overloading
void
const
char
18. A memory location with a name and data type - its content may be changed during program execution
escape sequences
variable
<<
non-static
19. The three values that can be used to initialize a pointer are 0 - __________ and an address.
cin
NULL
named constant
&
20. 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.
void
?
endl (same as 'n')
non-static
21. 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.
public
Sentinel
function scope
inline functions
22. Operator with only one operand
strcpy()
Sentinel
unary operator
type casting (conversion)
23. 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
type casting (conversion)
classes
object-oriented analysis and design (OOAD)
24. Used for dynamically allocated variables
heap
overloading
function overloading
scope
25. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
Unified Modeling Language(UML)
linker
operand value
//
26. C++ programs are normally typed into a computer using a(n) ________ program.
editor
scope
public
beginning
27. To write data to a file you define an object of which one of the following
binary operator
information hiding
ofstream
n
28. Function ________ is used to set the random number seed to randomize a program.
static_cast<char>(65)
?
semantics
srand
29. A variable that holds the address of another variable.
dot (.)
arithmetic expression
% modulus
pointer
30. The __________ operator reclaims memory previously allocated by new.
delete
{ }
named constant
function scope
31. This manipulator causes the field to be left-justified with padding spaces printed to the right.
sorting
left
rand
showpoint
32. Type casting syntax
object file
inline functions
static_cast<char>(65)
allocating memory
33. A human readable file that contains C++ program
source file
constant variable
operator overloading
member
34. 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.
variables
strlen()
?
char
35. Default name of executable file
this
a.out
token
access specifier
36. This is used to mark the end of a complete C++ programming statement.
beginning
classes
base class
Semicolon
37. In inheritance the ____________ is the class the receives the inherited members.
register
derived class
base class
prompt
38. Creates a copy of a string.
?
strcpy()
rand
whitespace
39. * / % + -
.cpp
Arithmetic Operators
function scope
void pointer
40. 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
variables
named constant
function overloading
41. Preprocessor directive syntax
#include <headerfilename>
0
const
if...else
42. Executable version of program
base class
object file
preprocessor
cin.get(ch)
43. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
strcmp()
escape sequences
special symbols
44. The modulus operator (%) can be used only with __________.
integer operands
globals
pointer
case sensitive
45. The ________ enables access to a global variable with the same name as a variable in the current scope.
access specifier
<<
unary scope resolution operator (::)
this
46. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
Semicolon
setw
#include directive
this
47. The _____ causes the contents of another file to be inserted into a program.
local variable
polymorphism
setw
#include directive
48. These are data items whose values do not change while the program is running
public
Literals
a.out
getline
49. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
Preprocessor
before
function prototype
friend
50. An operator that can only be used with int values. result will always be an int.
static_cast<char>(65)
scope resolution operator
editor
% modulus