SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
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 symbol for the binary scope resolution operator
{ }
::
unary operator
base
2. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
data type
semantics
Literals
named constant
3. Naming convention for C++ programs
.cpp
unary scope resolution operator (::)
cin.get(ch)
source file
4. Function ________ is used to set the random number seed to randomize a program.
break
srand
showpoint
binary operator
5. The ________ qualifier is used to declare read-only variables.
sorting
new line
stack
const
6. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.
address
inheritance
unary scope resolution operator (::)
template
7. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
if...else
function scope
source file
mixed expression
8. A function ________ enables a single function to be defined to perform a task on many different data types.
template
default constructor
unary operator
strcmp()
9. The storage-class specifiers are mutable - auto - ________ - extern and static.
operator
register
initialized
left
10. Every C++ statement ends with a(n) _________.
&
loader
semicolon
source file
11. Names of things that are used in a program - can apply to variables & constants and functions
semantics
identifiers
local variable
const
12. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
fstream
getline
Sentinel
return
13. A memory location with a name and data type - its content may be changed during program execution
variable
if...else
linker
searching
14. The ________ program combines the output of the compiler with various library functions to produce an executable image.
{ }
whitespace
unary scope resolution operator (::)
linker
15. A variable declared outside any block or function is a ________ variable.
rand
cmath
global
Counter-controlled or definite
16. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
#include
Unified Modeling Language(UML)
const datatype identifier = value
Counter-controlled or definite
17. A filestream variable that represents the default output device
cout
stack
beginning
member
18. A filestream variable that represents the default input source
cin
void pointer
char
Semicolon
19. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
void
subscript (or index)
Preprocessor
20. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
::
global
recursive function
21. Classes can have relationships with other classes. These relationships are called ________.
Sentinel
associations
Preprocessor
return
22. Lists and tables of values can be stored in arrays or __________.
initialized
vectors
loader
semantics
23. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
a.out
linker
opened
break
24. Use 2 characters to represent one
default constructor
cin
escape sequences
public
25. The three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
Semicolon
escape sequences
classes
26. A sequence of operands and operators that describe a calculation to be performed
arithmetic expression
const
function call
fstream
27. 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.
operand value
delete
setw
?
28. Whole numbers - no decimals and no commas included
variable
int values
non-static
loader
29. The ________ statement in a called function passes the value of an expression back to the calling function.
return
named constant
beginning
function parameters
30. All C++ Variables are_________.
globals
semantics
return
case sensitive
31. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
n
data type
auto
case sensitive
32. The number used to refer to a particular element of an array is called its ________.
base class
subscript (or index)
function call
static
33. The process of placing the elements of an array in order is called ________ the array.
arithmetic expression
sorting
editor
strcmp()
34. Nonexecutable statements that are included in a program to provide information about what the program does etc.
sorting
comments
if
editor
35. The stream insertion operator
cin >> variable
<<
rand
#include <headerfilename>
36. All ______ must be declared before they are used.
cin >> variable
like-type expression
variables
operand value
37. tab
global
object file
showpoint
t
38. The modulus operator (%) can be used only with __________.
void
0
integer operands
assignment statement
39. A human readable file that contains C++ program
recursive function
binary operator
.cpp
source file
40. The stream extraction operator
case sensitive
>>
a.out
cmath
41. 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.
n
floating-point
classes
continue
42. Creates a copy of a string.
definition
setw
fstream
strcpy()
43. 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.
information hiding
Default memberwise assignment
loader
inline functions
44. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.
unary scope resolution operator (::)
Arithmetic Operators
static
strcpy()
45. Keyword public is a(n) _________
non-static
access specifier
static
integer operands
46. The address-of operator. it is used to assign pointers and to print the address of variables.
selection
syntax
overloading
&
47. Preprocessor directive syntax
variable
#include <headerfilename>
::
&
48. Syntax for named constant declaration
const datatype identifier = value
access specifier
cout
before
49. Grammar rules of the language; compiler will try to identify and locate syntax errors
member
definition
Default memberwise assignment
syntax
50. To write data to a file you define an object of which one of the following
ofstream
template
return
n