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. This is used to mark the end of a complete C++ programming statement.
Semicolon
setw
private
base class
2. A function that calls itself
recursive function
named constant
subscript (or index)
strlen()
3. Syntax for named constant declaration
semicolon
const datatype identifier = value
mixed expression
overloading
4. Characters used to separate symbols or reserved words or identifiers and statements
variables
whitespace
associations
mixed expression
5. The stream extraction operator
strcpy()
#include directive
assignment
>>
6. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
reserve words
return
//
7. The elements of an array are related by the fact that they have the same name and ___________.
type
0
void
token
8. Creates a copy of a string.
this
cmath
strcpy()
Literals
9. int namespace include using return examples of ___________
function call
reserve words
Unified Modeling Language(UML)
friend
10. Whole numbers - no decimals and no commas included
int values
Counter-controlled or definite
n
information hiding
11. The address-of operator. it is used to assign pointers and to print the address of variables.
assignment
strcmp()
t
&
12. The ________ statement in a called function passes the value of an expression back to the calling function.
base class
scope resolution operator
const
return
13. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
friend
variable
Arithmetic Operators
14. The ________ qualifier is used to declare read-only variables.
static_cast<char>(65)
const
classes
Counter-controlled or definite
15. This manipulator causes the field to be left-justified with padding spaces printed to the right.
global
pointer
left
function overloading
16. A constant object must be __________; it cannot be modified after it is created.
void
initialized
rand
global
17. Naming convention for C++ programs
dot (.)
ofstream
.cpp
&
18. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
global
Preprocessor
semicolon
#include
19. Default name of executable file
const
named constant
a.out
selection
20. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
inheritance
operator overloading
const datatype identifier = value
private
21. A function that can be used to read character data including whitespace
cin.get(ch)
int values
strcpy()
linker
22. The three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
Literals
?
heap
23. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
base class
&
this
24. A __________ data member represents class-wide information.
scope
scope resolution operator
static
Arithmetic Operators
25. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
>>
Default memberwise assignment
heap
26. The sign you use for pointers
inline functions
Preprocessor
type casting (conversion)
*
27. 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
friend
arithmetic expression
#include directive
28. Executable version of program
object file
pointer
rand
access specifier
29. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
break
cin >> variable
local variable
classes
30. Lists and tables of values can be stored in arrays or __________.
classes
vectors
char
return
31. Names of things that are used in a program - can apply to variables & constants and functions
if...else
void
definition
identifiers
32. A file must be ________ before data can be written to or read from it.
//
strcpy()
template
opened
33. A ________ program executes before the compiler's translation phase begins.
NULL
function scope
preprocessor
Default memberwise assignment
34. A C++ statement that makes a decision is ______.
sorting
type coercion
if
variables
35. All C++ Variables are_________.
.cpp
setw
case sensitive
register
36. 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.
main
?
showpoint
reserved words
37. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
comments
void
int values
subscript (or index)
38. A filestream variable that represents the default output device
Preprocessor
object-oriented analysis and design (OOAD)
cout
Arithmetic Operators
39. 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.
#include
allocating memory
//
information hiding
40. Program components in C++ are called functions and ________.
classes
this
associations
comments
41. Forces the computer to display decimal point and trailing zeroes
assignment
reserved words
showpoint
function scope
42. 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.
>>
template
global
void
43. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
local variable
whitespace
private
stack
44. An operator that can only be used with int values. result will always be an int.
void
% modulus
delete
//
45. The ________ of an identifier is the portion of the program in which the identifier can be used.
NULL
object-oriented analysis and design (OOAD)
scope
arithmetic expression
46. The size & shape & color and weight of an object are considered
ofstream
function scope
attributes
recursive
47. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
&
unary scope resolution operator (::)
const datatype identifier = value
function scope
48. Compares two strings and returns 0 if they are equal.
floating-point
strcmp()
fstream
const
49. Identifier or expression that is part of the calculation to be performed
template
cmath
operand value
strlen()
50. Operator with two operands
scope
variable
binary operator
static