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. The ________ of an identifier is the portion of the program in which the identifier can be used.
globals
mixed expression
type
scope
2. The symbol for the binary scope resolution operator
preprocessor
address
static_cast<char>(65)
::
3. Nonexecutable statements that are included in a program to provide information about what the program does etc.
#include
comments
data type
friend
4. A ________ program executes before the compiler's translation phase begins.
preprocessor
public
this
assignment
5. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
a.out
Sentinel
cmath
register
6. The ________ qualifier is used to declare read-only variables.
const
function call
operator
named constant
7. Syntax for named constant declaration
template
continue
delete
const datatype identifier = value
8. Use 2 characters to represent one
escape sequences
polymorphism
base
public
9. 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.
globals
information hiding
getline
Literals
10. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
before
mixed expression
unary operator
11. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
associations
Unified Modeling Language(UML)
unary scope resolution operator (::)
if
12. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
allocating memory
base class
whitespace
this
13. The ________ enables access to a global variable with the same name as a variable in the current scope.
strlen()
const
unary scope resolution operator (::)
mixed expression
14. Every C++ statement ends with a(n) _________.
/n
semicolon
unary operator
base class
15. Classes can have relationships with other classes. These relationships are called ________.
associations
linker
.cpp
public
16. A memory location with a name and data type - its content may be changed during program execution
break
static
variable
member
17. Header file that contains commonly performed mathematical functions
cmath
int values
pointer
member
18. Type casting syntax
address
static_cast<char>(65)
beginning
>>
19. A function that calls itself
recursive function
reserve words
//
escape sequences
20. Program components in C++ are called functions and ________.
polymorphism
type
classes
recursive function
21. A function that can be used to read character data including whitespace
left
access specifier
if
cin.get(ch)
22. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
variable
&
new line
operand value
23. The sign you use for pointers
*
associations
base class
before
24. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
virtual functions
Unified Modeling Language(UML)
heap
25. Executable version of program
object file
main
function scope
opened
26. A __________ should be used to declare the size of an array because it makes the program more scalable.
rand
preprocessor
subscript (or index)
constant variable
27. C++ programs are normally typed into a computer using a(n) ________ program.
editor
identifiers
type coercion
arithmetic expression
28. 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 (.)
switch
derived class
binary operator
29. All C++ Variables are_________.
{ }
case sensitive
editor
register
30. The only integer that can be assigned directly to a pointer is_____________.
<<
pointer
return
0
31. __________ can be used to assign an object of a class to another object of the same class.
function call
fstream
Default memberwise assignment
semantics
32. Operator with two operands
inheritance
subscript (or index)
binary operator
template
33. Used for dynamically allocated variables
data type
heap
selection
cout
34. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
#include directive
*
token
assignment statement
35. Preprocessor directive syntax
heap
#include <headerfilename>
static_cast<char>(65)
case sensitive
36. This manipulator causes the field to be left-justified with padding spaces printed to the right.
#include directive
reserved words
left
{ }
37. Function ________ is used to produce random numbers.
fstream
rand
access specifier
syntax
38. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
assignment
delete
heap
auto
39. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
strcmp()
left
static_cast<char>(65)
40. Identifier or expression that is part of the calculation to be performed
cmath
operand value
preprocessor
Literals
41. 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.
before
Sentinel
data type
escape sequences
42. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
/n
Literals
function overloading
if...else
43. 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.
//
base
constant variable
virtual functions
44. The stream insertion operator
semantics
<<
definition
public
45. Symbol that denotes an action to be performed
switch
special symbols
t
operator
46. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
searching
getline
this
inheritance
47. Used to qualify hidden names so that they can be used.
scope resolution operator
friend
type casting (conversion)
new line
48. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
endl (same as 'n')
cin >> variable
source file
49. A filestream variable that represents the default output device
cout
semantics
attributes
void pointer
50. The ________ statement in a called function passes the value of an expression back to the calling function.
cin >> variable
assignment
return
mixed expression