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. Forces the computer to display decimal point and trailing zeroes
showpoint
globals
const
variables
2. The _____ causes the contents of another file to be inserted into a program.
type coercion
comments
#include directive
operator overloading
3. Initializers __________ must be used to initialize constant members of a class.
member
preprocessor
non-static
classes
4. The stream extraction operator
strcmp()
linker
>>
Default memberwise assignment
5. The stream insertion operator
data type
<<
access specifier
0
6. A ________ program executes before the compiler's translation phase begins.
preprocessor
floating-point
{ }
rand
7. The sign you use for references
const datatype identifier = value
&
reserve words
base
8. 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.
searching
information hiding
Preprocessor
access specifier
9. A type of pointer that can point at objects of any data type.
void pointer
&
fixed
*
10. In inheritance the ____________ is the class the receives the inherited members.
derived class
linker
object-oriented analysis and design (OOAD)
static
11. Preprocessor directive syntax
prompt
this
non-static
#include <headerfilename>
12. All ______ must be declared before they are used.
subscript (or index)
function scope
variables
t
13. You can declare default values for a function in the ____________________.
function parameters
if
information hiding
strlen()
14. To allow file access in a program you must #include this header file.
NULL
fstream
type casting (conversion)
Literals
15. A set of values together with a set of operations
data type
static
globals
classes
16. Use 2 characters to represent one
cin.get(ch)
new line
escape sequences
virtual functions
17. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
base
void
function overloading
public
18. Nonexecutable statements that are included in a program to provide information about what the program does etc.
left
case sensitive
comments
operand value
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 ________.
loader
overloading
special symbols
initialized
20. This manipulator causes the field to be left-justified with padding spaces printed to the right.
subscript (or index)
base
left
stack
21. Executable version of program
definition
cin.get(ch)
function overloading
object file
22. To write data to a file you define an object of which one of the following
Default memberwise assignment
overloading
cmath
ofstream
23. Allows the programmer to store a value in a variable
identifiers
assignment statement
a.out
char
24. Names of things that are used in a program - can apply to variables & constants and functions
0
Default memberwise assignment
rand
identifiers
25. Two slash marks ( // ) indicate __________ of a comment
Literals
polymorphism
preprocessor
beginning
26. 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.
token
//
continue
special symbols
27. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
identifiers
case sensitive
scope
globals
28. A function is invoked with a ________.
const
function call
access specifier
Arithmetic Operators
29. = & | are examples of ____________.
sorting
static
special symbols
cmath
30. Most calculations are normally performed by ______ statements.
const
.cpp
assignment
variables
31. Used for function calls and local variables
semicolon
stack
rand
unary operator
32. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
cin
function prototype
#include
const datatype identifier = value
33. 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.
::
{ }
associations
/n
34. Words that are used for special purposes in a program
syntax
assignment
Preprocessor
reserved words
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.
assignment
static_cast<char>(65)
private
break
36. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
preprocessor
fixed
classes
binary operator
37. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
srand
binary operator
virtual functions
38. Member objects are constructed __________ their enclosing class object.
getline
public
named constant
before
39. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
like-type expression
default constructor
classes
40. The __________ operator reclaims memory previously allocated by new.
delete
scope resolution operator
source file
cout
41. Compares two strings and returns 0 if they are equal.
assignment statement
strcmp()
special symbols
global
42. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.
dot (.)
type coercion
binary operator
Closing brace
43. This is used to mark the end of a complete C++ programming statement.
return
overloading
binary operator
Semicolon
44. The _________ begins the body of every function and the _________ ends the body of every function.
if
identifiers
beginning
{ }
45. A function that can be used to read character data including whitespace
rand
selection
cin.get(ch)
semicolon
46. Every C++ program begins execution at the function _________.
cout
main
function overloading
friend
47. The sign you use for pointers
semantics
*
break
strlen()
48. A function that calls itself
Stack overflow
auto
classes
recursive function
49. A program that finds and attaches to your program the indicated libraries for compilation
mixed expression
cmath
preprocessor
recursive function
50. A file must be ________ before data can be written to or read from it.
operand value
opened
associations
data type