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. Message displayed to the screen asking user for input; generated with an output statement
derived class
ofstream
t
prompt
2. A memory location with a name and data type - its content may be changed during program execution
two-dimensional
variable
left
recursive
3. Characters used to separate symbols or reserved words or identifiers and statements
.cpp
global
void pointer
whitespace
4. Sets floating-point values to a fixed decimal format
scope
fixed
Counter-controlled or definite
scope resolution operator
5. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
setw
scope resolution operator
void
if
6. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
opened
pointer
if
7. 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.
void
like-type expression
source file
continue
8. All ______ must be declared before they are used.
0
attributes
reserve words
variables
9. Returns the length of a string excluding the null terminator.
cin
strlen()
searching
>>
10. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
&
reserved words
initialized
friend
11. Classes can have relationships with other classes. These relationships are called ________.
#include
arithmetic expression
associations
char
12. Words that are used for special purposes in a program
reserved words
#include directive
editor
source file
13. The stream insertion operator
<<
inheritance
fstream
srand
14. The only integer that can be assigned directly to a pointer is_____________.
preprocessor
scope resolution operator
0
Preprocessor
15. A set of values together with a set of operations
data type
base class
Counter-controlled or definite
prompt
16. Used for function calls and local variables
Stack overflow
inheritance
*
stack
17. Two slash marks ( // ) indicate __________ of a comment
searching
binary operator
beginning
unary scope resolution operator (::)
18. * / % + -
friend
Stack overflow
opened
Arithmetic Operators
19. 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
function scope
<<
operator overloading
20. The sign you use for pointers
*
Default memberwise assignment
::
token
21. A __________ data member represents class-wide information.
constant variable
Closing brace
if
static
22. The sign you use for references
named constant
initialized
&
searching
23. 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
left
delete
srand
base
24. Default name of executable file
classes
recursive
floating-point
a.out
25. The ________ enables access to a global variable with the same name as a variable in the current scope.
Sentinel
unary scope resolution operator (::)
local variable
scope resolution operator
26. 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.
Stack overflow
recursive
assignment statement
static
27. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
new line
arithmetic expression
void
function overloading
28. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
function prototype
>>
cout
29. data types that refer to numbers with decimals
vectors
linker
floating-point
source file
30. = & | are examples of ____________.
subscript (or index)
special symbols
comments
cmath
31. A ________ program executes before the compiler's translation phase begins.
loader
void
preprocessor
source file
32. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
heap
selection
address
33. 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.
?
default constructor
return
a.out
34. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
semicolon
globals
access specifier
35. You can declare default values for a function in the ____________________.
dot (.)
function parameters
NULL
static
36. Creates a copy of a string.
strcpy()
register
binary operator
if
37. This manipulator is used to establish a field width for the value immediately following it.
scope resolution operator
setw
scope
strcpy()
38. __________ can be used to assign an object of a class to another object of the same class.
local variable
Default memberwise assignment
*
template
39. Program components in C++ are called functions and ________.
return
associations
cmath
classes
40. Function ________ is used to produce random numbers.
rand
semicolon
unary scope resolution operator (::)
#include directive
41. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
access specifier
operator
token
setw
42. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
return
opened
char
//
43. A pointer is a variable that contains as its value the____________ of another variable.
linker
classes
address
{ }
44. 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.
variable
a.out
object file
Sentinel
45. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
srand
non-static
two-dimensional
46. The _________ begins the body of every function and the _________ ends the body of every function.
vectors
initialized
Sentinel
{ }
47. A function ________ enables a single function to be defined to perform a task on many different data types.
template
scope resolution operator
rand
const datatype identifier = value
48. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
source file
classes
allocating memory
showpoint
49. Whole numbers - no decimals and no commas included
this
heap
int values
operator overloading
50. The number used to refer to a particular element of an array is called its ________.
Unified Modeling Language(UML)
void
unary scope resolution operator (::)
subscript (or index)