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. Executable version of program
constant variable
escape sequences
object file
floating-point
2. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
virtual functions
/n
classes
?
3. Classes can have relationships with other classes. These relationships are called ________.
associations
a.out
&
non-static
4. Grammar rules of the language; compiler will try to identify and locate syntax errors
break
const
syntax
editor
5. Use 2 characters to represent one
Preprocessor
escape sequences
?
associations
6. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
access specifier
overloading
void pointer
strcmp()
7. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
opened
operator overloading
sorting
8. You must have a ___________ for every variable you intend to use in a program
friend
setw
definition
address
9. Message displayed to the screen asking user for input; generated with an output statement
left
prompt
void
strlen()
10. Type casting syntax
default constructor
binary operator
static_cast<char>(65)
virtual functions
11. data types that refer to numbers with decimals
object-oriented analysis and design (OOAD)
assignment
attributes
floating-point
12. Every C++ program begins execution at the function _________.
semantics
base
main
token
13. The process of analyzing and designing a system from an object-oriented point of view is called ________.
private
object-oriented analysis and design (OOAD)
linker
const
14. tab
::
recursive
strcpy()
t
15. 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.
prompt
return
ofstream
/n
16. Used for dynamically allocated variables
heap
like-type expression
classes
special symbols
17. Returns the length of a string excluding the null terminator.
register
preprocessor
strlen()
function parameters
18. * / % + -
Arithmetic Operators
public
identifiers
syntax
19. The process of determining if an array contains a particular key value is called _________ the array.
special symbols
0
selection
searching
20. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
base
Closing brace
Default memberwise assignment
21. An array that uses two subscripts is referred to as a(n) _________ array.
member
assignment
two-dimensional
type
22. A filestream variable that represents the default input source
prompt
cout
identifiers
cin
23. A file must be ________ before data can be written to or read from it.
opened
information hiding
operator
token
24. Syntax for named constant declaration
loader
operand value
editor
const datatype identifier = value
25. Identifier or expression that is part of the calculation to be performed
non-static
base class
scope
operand value
26. A ________ program executes before the compiler's translation phase begins.
semicolon
token
Default memberwise assignment
preprocessor
27. A variable that is known only within the function in which it is defined is called a ________.
recursive function
local variable
unary operator
cin.get(ch)
28. C++ programs are normally typed into a computer using a(n) ________ program.
editor
void
derived class
Unified Modeling Language(UML)
29. Names of things that are used in a program - can apply to variables & constants and functions
register
allocating memory
identifiers
Default memberwise assignment
30. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
mixed expression
register
a.out
31. An expression that has operands with different data types
mixed expression
public
Counter-controlled or definite
object file
32. The _____ causes the contents of another file to be inserted into a program.
scope resolution operator
const
Sentinel
#include directive
33. 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.
local variable
definition
Sentinel
static
34. A function that can be used to read character data including whitespace
<<
0
cin.get(ch)
special symbols
35. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
if...else
inline functions
constant variable
srand
36. A constant object must be __________; it cannot be modified after it is created.
variable
initialized
function prototype
.cpp
37. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Literals
Unified Modeling Language(UML)
heap
object file
38. An operator that can only be used with int values. result will always be an int.
type coercion
% modulus
Default memberwise assignment
a.out
39. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
if
fixed
char
40. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
function prototype
pointer
preprocessor
Semicolon
41. In inheritance the ____________ is the class the receives the inherited members.
this
friend
derived class
Default memberwise assignment
42. A C++ statement that makes a decision is ______.
address
friend
if
unary operator
43. The ________ program combines the output of the compiler with various library functions to produce an executable image.
return
prompt
linker
private
44. A pointer is a variable that contains as its value the____________ of another variable.
fixed
type
address
>>
45. The ________ enables access to a global variable with the same name as a variable in the current scope.
const
unary scope resolution operator (::)
operator overloading
{ }
46. Associate an identifier with a memory location
cin >> variable
function parameters
object-oriented analysis and design (OOAD)
allocating memory
47. A __________ data member represents class-wide information.
selection
static
floating-point
vectors
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.
private
continue
return
constant variable
49. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
like-type expression
break
inline functions
return
50. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
local variable
token
endl (same as 'n')
char