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. A function is invoked with a ________.
function call
virtual functions
static
/n
2. Class members specified as _________ are accessible anywhere an object of the class is in scope.
fixed
global
public
sorting
3. C++ programs are normally typed into a computer using a(n) ________ program.
loader
editor
reserve words
member
4. The sign you use for pointers
searching
*
prompt
t
5. The symbol for the binary scope resolution operator
::
strcpy()
pointer
cin
6. For every opening brace in a C++ program there must be a ______________.
n
a.out
Closing brace
globals
7. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
{ }
scope resolution operator
getline
8. If a member initializer is not provided for a member object of a class the object's __________ is called.
Arithmetic Operators
default constructor
escape sequences
NULL
9. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
% modulus
char
static
showpoint
10. 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.
/n
delete
auto
t
11. Function ________ is used to set the random number seed to randomize a program.
access specifier
srand
break
NULL
12. This manipulator is used to establish a field width for the value immediately following it.
public
syntax
allocating memory
setw
13. * / % + -
mixed expression
static
Counter-controlled or definite
Arithmetic Operators
14. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
fixed
function prototype
semantics
a.out
15. A C++ statement that makes a decision is ______.
arithmetic expression
if
classes
before
16. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
{ }
preprocessor
continue
overloading
17. Compares two strings and returns 0 if they are equal.
default constructor
strcmp()
overloading
new line
18. These are data items whose values do not change while the program is running
.cpp
Literals
local variable
pointer
19. The __________ operator reclaims memory previously allocated by new.
switch
before
delete
&
20. A member function should be declared static if it does not access __________ class members.
loader
floating-point
non-static
heap
21. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
register
Default memberwise assignment
::
selection
22. 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
variable
inheritance
whitespace
23. The _________ begins the body of every function and the _________ ends the body of every function.
continue
{ }
private
token
24. Program components in C++ are called functions and ________.
assignment statement
int values
classes
reserved words
25. Associate an identifier with a memory location
static
allocating memory
fstream
vectors
26. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
auto
semicolon
const
strcmp()
27. You must have a ___________ for every variable you intend to use in a program
break
definition
Semicolon
scope
28. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
prompt
strlen()
if...else
29. This is used to mark the end of a complete C++ programming statement.
switch
static
Semicolon
syntax
30. A memory location with a name and data type - its content may be changed during program execution
Counter-controlled or definite
function scope
void
variable
31. Type casting syntax
two-dimensional
Unified Modeling Language(UML)
static_cast<char>(65)
whitespace
32. Used to qualify hidden names so that they can be used.
void
scope resolution operator
const datatype identifier = value
Closing brace
33. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
preprocessor
assignment statement
register
member
34. A type of pointer that can point at objects of any data type.
function scope
address
void pointer
function call
35. A pointer is a variable that contains as its value the____________ of another variable.
Arithmetic Operators
address
#include <headerfilename>
source file
36. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
new line
pointer
token
access specifier
37. 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
base
prompt
void
int values
38. Repeating a set of instructions a specific number of times is called_________repetition.
strcmp()
Counter-controlled or definite
searching
Semicolon
39. Keyword public is a(n) _________
before
globals
recursive function
access specifier
40. Operator with only one operand
type coercion
unary operator
left
>>
41. Identifier or expression that is part of the calculation to be performed
delete
operand value
variables
virtual functions
42. Most calculations are normally performed by ______ statements.
source file
preprocessor
assignment
cin
43. In inheritance the ____________ is the class the receives the inherited members.
static_cast<char>(65)
inheritance
derived class
main
44. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
classes
char
Stack overflow
dot (.)
45. A ________ program executes before the compiler's translation phase begins.
function call
preprocessor
vectors
data type
46. Executable version of program
type coercion
object file
unary operator
type casting (conversion)
47. tab
recursive function
case sensitive
local variable
t
48. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
?
cout
classes
comments
49. A variable that holds the address of another variable.
pointer
const
scope
recursive function
50. The ________ qualifier is used to declare read-only variables.
pointer
const
function overloading
return