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 filestream variable that represents the default output device
break
member
cout
#include <headerfilename>
2. The ________ statement in a called function passes the value of an expression back to the calling function.
setw
return
n
Arithmetic Operators
3. Every C++ program begins execution at the function _________.
operand value
continue
whitespace
main
4. An expression that has operands with different data types
fstream
scope resolution operator
mixed expression
unary scope resolution operator (::)
5. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
Default memberwise assignment
selection
beginning
local variable
6. 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.
showpoint
continue
register
<<
7. 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.
classes
/n
base class
return
8. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
definition
*
classes
9. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
overloading
Semicolon
address
10. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
<<
strcmp()
showpoint
11. The size & shape & color and weight of an object are considered
const
public
attributes
unary scope resolution operator (::)
12. You must have a ___________ for every variable you intend to use in a program
recursive function
definition
int values
case sensitive
13. Function ________ is used to set the random number seed to randomize a program.
srand
attributes
dot (.)
showpoint
14. Creates a copy of a string.
strcpy()
.cpp
before
Preprocessor
15. You can declare default values for a function in the ____________________.
address
function parameters
main
template
16. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
#include
semantics
auto
Unified Modeling Language(UML)
17. The three values that can be used to initialize a pointer are 0 - __________ and an address.
function parameters
const
0
NULL
18. Use 2 characters to represent one
escape sequences
fstream
overloading
linker
19. The ________ program combines the output of the compiler with various library functions to produce an executable image.
comments
Literals
ofstream
linker
20. A program that finds and attaches to your program the indicated libraries for compilation
void pointer
virtual functions
preprocessor
&
21. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
address
globals
attributes
default constructor
22. The ________ qualifier is used to declare read-only variables.
binary operator
local variable
const
unary scope resolution operator (::)
23. If a member initializer is not provided for a member object of a class the object's __________ is called.
>>
n
type
default constructor
24. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
fstream
public
//
Preprocessor
25. 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
function call
static_cast<char>(65)
classes
26. 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.
t
void
left
type casting (conversion)
27. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.
virtual functions
Literals
const datatype identifier = value
inheritance
28. Member objects are constructed __________ their enclosing class object.
base class
overloading
Arithmetic Operators
before
29. Most calculations are normally performed by ______ statements.
#include <headerfilename>
<<
static
assignment
30. Naming convention for C++ programs
.cpp
main
data type
% modulus
31. A function that calls itself
recursive function
pointer
token
opened
32. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
arithmetic expression
endl (same as 'n')
beginning
new line
33. A function is invoked with a ________.
unary operator
function call
cout
global
34. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.
const
cin >> variable
main
information hiding
35. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
break
void
operator overloading
Counter-controlled or definite
36. A function ________ enables a single function to be defined to perform a task on many different data types.
Sentinel
type casting (conversion)
template
return
37. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
char
overloading
Default memberwise assignment
semantics
38. 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.
floating-point
?
before
strcpy()
39. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
?
editor
function prototype
if...else
40. Used for dynamically allocated variables
dot (.)
heap
base
Arithmetic Operators
41. Used to qualify hidden names so that they can be used.
access specifier
searching
assignment statement
scope resolution operator
42. The sign you use for references
&
return
syntax
function prototype
43. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
floating-point
NULL
Stack overflow
scope
44. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
reserved words
Stack overflow
dot (.)
45. The storage-class specifiers are mutable - auto - ________ - extern and static.
reserve words
register
information hiding
reserved words
46. A function that can be used to read character data including whitespace
operand value
cin.get(ch)
object-oriented analysis and design (OOAD)
{ }
47. The modulus operator (%) can be used only with __________.
pointer
integer operands
fixed
cout
48. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
/n
char
Default memberwise assignment
cout
49. The ________ program transfers the executable image of a C++ program from disk to memory.
Closing brace
#include <headerfilename>
loader
inline functions
50. A set of values together with a set of operations
return
default constructor
data type
allocating memory