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. Symbol that denotes an action to be performed
function overloading
if...else
operator
floating-point
2. You can declare default values for a function in the ____________________.
function parameters
const
static
constant variable
3. The ________ enables access to a global variable with the same name as a variable in the current scope.
fstream
function parameters
#include directive
unary scope resolution operator (::)
4. A human readable file that contains C++ program
strlen()
heap
source file
char
5. 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.
token
?
cin >> variable
void
6. A file must be ________ before data can be written to or read from it.
ofstream
opened
type casting (conversion)
Stack overflow
7. newline
n
const
whitespace
0
8. Preprocessor directive syntax
heap
&
#include <headerfilename>
scope resolution operator
9. Characters used to separate symbols or reserved words or identifiers and statements
syntax
reserve words
whitespace
local variable
10. Sets floating-point values to a fixed decimal format
type coercion
fixed
this
associations
11. The _____ causes the contents of another file to be inserted into a program.
cmath
object-oriented analysis and design (OOAD)
#include directive
cin.get(ch)
12. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
auto
pointer
whitespace
reserved words
13. Type casting syntax
char
register
static_cast<char>(65)
before
14. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
operator overloading
/n
new line
global
15. A function that calls itself
recursive function
operand value
classes
char
16. 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.
inheritance
strcmp()
void
editor
17. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
function overloading
operator
selection
const
18. To allow file access in a program you must #include this header file.
base
base class
int values
fstream
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 ________.
static_cast<char>(65)
base class
overloading
char
20. 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.
/n
binary operator
global
strcmp()
21. The sign you use for pointers
if...else
auto
public
*
22. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
access specifier
void
type casting (conversion)
break
23. The size & shape & color and weight of an object are considered
if
non-static
attributes
dot (.)
24. Whole numbers - no decimals and no commas included
static
assignment statement
subscript (or index)
int values
25. Syntax for named constant declaration
const datatype identifier = value
this
recursive
type casting (conversion)
26. 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.
static
selection
#include <headerfilename>
?
27. An operator that can only be used with int values. result will always be an int.
type casting (conversion)
Semicolon
% modulus
?
28. The only integer that can be assigned directly to a pointer is_____________.
token
0
syntax
subscript (or index)
29. The symbol for the binary scope resolution operator
overloading
::
Closing brace
like-type expression
30. A variable declared outside any block or function is a ________ variable.
virtual functions
this
global
object file
31. The three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
private
recursive function
cin >> variable
32. Default name of executable file
&
opened
data type
a.out
33. The elements of an array are related by the fact that they have the same name and ___________.
type coercion
definition
endl (same as 'n')
type
34. A ________ program executes before the compiler's translation phase begins.
template
Stack overflow
preprocessor
void
35. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
case sensitive
cin >> variable
.cpp
if
36. A sequence of operands and operators that describe a calculation to be performed
constant variable
stack
arithmetic expression
auto
37. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
definition
strlen()
static
38. directive A statement that starts with a # is called a ____________.
sorting
address
derived class
Preprocessor
39. All ______ must be declared before they are used.
associations
variables
globals
continue
40. These are data items whose values do not change while the program is running
integer operands
Literals
if
getline
41. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
static
two-dimensional
friend
void pointer
42. Forces the computer to display decimal point and trailing zeroes
Unified Modeling Language(UML)
showpoint
subscript (or index)
Preprocessor
43. The process of analyzing and designing a system from an object-oriented point of view is called ________.
this
member
object-oriented analysis and design (OOAD)
switch
44. 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 (.)
operator overloading
binary operator
return
45. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
static
type coercion
const
46. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
auto
#include directive
cin
token
47. A function that can be used to read character data including whitespace
arithmetic expression
cin.get(ch)
auto
inheritance
48. This manipulator is used to establish a field width for the value immediately following it.
special symbols
setw
recursive
Arithmetic Operators
49. Operator with only one operand
local variable
constant variable
unary operator
rand
50. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
Sentinel
::
semantics
recursive