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. Header file that contains commonly performed mathematical functions
recursive
if...else
escape sequences
cmath
2. A pointer is a variable that contains as its value the____________ of another variable.
int values
address
operator overloading
template
3. The three values that can be used to initialize a pointer are 0 - __________ and an address.
object file
pointer
arithmetic expression
NULL
4. Executable version of program
object file
definition
setw
static
5. Keyword public is a(n) _________
if
reserved words
access specifier
derived class
6. An expression that has operands with different data types
cout
main
mixed expression
cin >> variable
7. You can declare default values for a function in the ____________________.
function parameters
Sentinel
strcmp()
cmath
8. A member function should be declared static if it does not access __________ class members.
inline functions
Counter-controlled or definite
variable
non-static
9. To write data to a file you define an object of which one of the following
ofstream
static_cast<char>(65)
token
int values
10. newline
semicolon
constant variable
n
operand value
11. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
floating-point
Unified Modeling Language(UML)
template
function scope
12. A variable that is known only within the function in which it is defined is called a ________.
identifiers
Literals
classes
local variable
13. A __________ data member represents class-wide information.
named constant
<<
static
base class
14. The only integer that can be assigned directly to a pointer is_____________.
0
function call
type
named constant
15. 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.
comments
type
static
Literals
16. directive A statement that starts with a # is called a ____________.
Preprocessor
initialized
unary scope resolution operator (::)
unary operator
17. Used to qualify hidden names so that they can be used.
#include <headerfilename>
arithmetic expression
scope resolution operator
assignment
18. = & | are examples of ____________.
special symbols
switch
case sensitive
binary operator
19. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
>>
inheritance
local variable
20. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
preprocessor
ofstream
vectors
21. The ________ qualifier is used to declare read-only variables.
member
classes
allocating memory
const
22. Sets floating-point values to a fixed decimal format
fixed
showpoint
selection
source file
23. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
type coercion
operator
void
24. The ________ program transfers the executable image of a C++ program from disk to memory.
Sentinel
new line
loader
default constructor
25. C++ programs are normally typed into a computer using a(n) ________ program.
assignment statement
const
strcmp()
editor
26. An expression in which all operands have the same data type - result will have the same data type as operands
main
like-type expression
//
linker
27. Identifier or expression that is part of the calculation to be performed
Counter-controlled or definite
overloading
operand value
comments
28. Initializers __________ must be used to initialize constant members of a class.
function prototype
const
*
member
29. The _________ begins the body of every function and the _________ ends the body of every function.
srand
void pointer
{ }
assignment
30. Characters used to separate symbols or reserved words or identifiers and statements
object file
0
whitespace
overloading
31. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
information hiding
function overloading
public
static
32. Syntax for named constant declaration
pointer
const datatype identifier = value
whitespace
>>
33. Two slash marks ( // ) indicate __________ of a comment
strcpy()
beginning
before
case sensitive
34. A function that calls itself
recursive function
base
assignment statement
continue
35. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
if
new line
Counter-controlled or definite
void
36. Use 2 characters to represent one
strlen()
if
definition
escape sequences
37. Names of things that are used in a program - can apply to variables & constants and functions
definition
identifiers
delete
this
38. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
subscript (or index)
operator
//
const
39. Operator with two operands
binary operator
before
endl (same as 'n')
*
40. * / % + -
function parameters
constant variable
Default memberwise assignment
Arithmetic Operators
41. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
polymorphism
this
return
identifiers
42. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
recursive function
if
operator overloading
.cpp
43. A set of values together with a set of operations
data type
strlen()
before
a.out
44. Classes can have relationships with other classes. These relationships are called ________.
member
#include directive
associations
::
45. 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
a.out
base
recursive
46. The _____ causes the contents of another file to be inserted into a program.
assignment
assignment statement
#include directive
return
47. 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.
Sentinel
int values
char
strcpy()
48. Used for dynamically allocated variables
editor
break
heap
assignment
49. Compares two strings and returns 0 if they are equal.
Unified Modeling Language(UML)
non-static
strcmp()
/n
50. These are data items whose values do not change while the program is running
>>
Literals
function call
assignment