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 elements of an array are related by the fact that they have the same name and ___________.
type
special symbols
Unified Modeling Language(UML)
main
2. A memory location with a name and data type - its content may be changed during program execution
variable
cin
data type
scope resolution operator
3. A set of values together with a set of operations
data type
static
constant variable
virtual functions
4. The process of analyzing and designing a system from an object-oriented point of view is called ________.
void pointer
new line
object-oriented analysis and design (OOAD)
left
5. An array that uses two subscripts is referred to as a(n) _________ array.
fstream
two-dimensional
friend
Default memberwise assignment
6. All ______ must be declared before they are used.
const datatype identifier = value
Sentinel
default constructor
variables
7. Forces the computer to display decimal point and trailing zeroes
<<
definition
data type
showpoint
8. The modulus operator (%) can be used only with __________.
&
strlen()
Literals
integer operands
9. 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
setw
Unified Modeling Language(UML)
return
10. The ________ program combines the output of the compiler with various library functions to produce an executable image.
linker
recursive function
before
unary operator
11. Lists and tables of values can be stored in arrays or __________.
Arithmetic Operators
n
variables
vectors
12. The stream insertion operator
void
operand value
<<
{ }
13. Classes can have relationships with other classes. These relationships are called ________.
operator
Closing brace
NULL
associations
14. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
continue
cin >> variable
variables
getline
15. A function ________ enables a single function to be defined to perform a task on many different data types.
semicolon
scope
before
template
16. Returns the length of a string excluding the null terminator.
strlen()
rand
assignment statement
function scope
17. A __________ should be used to declare the size of an array because it makes the program more scalable.
syntax
<<
constant variable
loader
18. 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.
int values
/n
if...else
static
19. The process of placing the elements of an array in order is called ________ the array.
sorting
strcpy()
object-oriented analysis and design (OOAD)
function parameters
20. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
Counter-controlled or definite
const
public
named constant
21. Repeating a set of instructions a specific number of times is called_________repetition.
stack
Counter-controlled or definite
function call
void
22. The storage-class specifiers are mutable - auto - ________ - extern and static.
prompt
register
<<
if...else
23. 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.
reserved words
before
void
assignment statement
24. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
public
% modulus
linker
25. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
whitespace
like-type expression
operator
26. A function is invoked with a ________.
function call
scope
comments
case sensitive
27. The stream extraction operator
local variable
global
if...else
>>
28. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
/n
two-dimensional
function prototype
srand
29. Characters used to separate symbols or reserved words or identifiers and statements
address
function overloading
prompt
whitespace
30. You must have a ___________ for every variable you intend to use in a program
t
pointer
mixed expression
definition
31. Program components in C++ are called functions and ________.
like-type expression
classes
scope
strcmp()
32. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
overloading
initialized
void
loader
33. The sign you use for references
editor
&
cout
global
34. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
const
classes
//
globals
35. A program that finds and attaches to your program the indicated libraries for compilation
object file
type coercion
preprocessor
register
36. To allow file access in a program you must #include this header file.
Arithmetic Operators
break
&
fstream
37. These are data items whose values do not change while the program is running
Literals
void
binary operator
case sensitive
38. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
global
public
ofstream
39. The only integer that can be assigned directly to a pointer is_____________.
type coercion
member
0
initialized
40. Preprocessor directive syntax
data type
Semicolon
#include <headerfilename>
#include directive
41. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
recursive function
source file
overloading
42. The size & shape & color and weight of an object are considered
attributes
stack
scope resolution operator
global
43. C++ programs are normally typed into a computer using a(n) ________ program.
selection
private
editor
source file
44. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
variables
private
mixed expression
0
45. A variable that is known only within the function in which it is defined is called a ________.
auto
local variable
if...else
arithmetic expression
46. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
operand value
derived class
if...else
return
47. Use 2 characters to represent one
escape sequences
globals
virtual functions
prompt
48. 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.
continue
new line
derived class
srand
49. To write data to a file you define an object of which one of the following
strlen()
variable
unary operator
ofstream
50. A file must be ________ before data can be written to or read from it.
semantics
base class
opened
constant variable