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. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
semantics
token
Arithmetic Operators
#include directive
2. In inheritance the ____________ is the class the receives the inherited members.
recursive function
rand
derived class
object file
3. Used for function calls and local variables
stack
Counter-controlled or definite
&
/n
4. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
case sensitive
&
type coercion
new line
5. The stream insertion operator
cin
reserve words
<<
Sentinel
6. Default name of executable file
Preprocessor
a.out
private
named constant
7. A memory location with a name and data type - its content may be changed during program execution
heap
variable
floating-point
Preprocessor
8. For every opening brace in a C++ program there must be a ______________.
comments
assignment statement
derived class
Closing brace
9. Repeating a set of instructions a specific number of times is called_________repetition.
cin >> variable
data type
classes
Counter-controlled or definite
10. Class members specified as _________ are accessible anywhere an object of the class is in scope.
cin.get(ch)
public
scope resolution operator
fstream
11. You can declare default values for a function in the ____________________.
mixed expression
function parameters
vectors
void
12. The _____ causes the contents of another file to be inserted into a program.
case sensitive
int values
#include directive
Sentinel
13. directive A statement that starts with a # is called a ____________.
Preprocessor
loader
strcpy()
#include directive
14. Grammar rules of the language; compiler will try to identify and locate syntax errors
Counter-controlled or definite
subscript (or index)
information hiding
syntax
15. A variable that is known only within the function in which it is defined is called a ________.
scope resolution operator
static
local variable
classes
16. This is used to mark the end of a complete C++ programming statement.
Semicolon
vectors
char
<<
17. Characters used to separate symbols or reserved words or identifiers and statements
Unified Modeling Language(UML)
allocating memory
base class
whitespace
18. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
linker
::
friend
assignment statement
19. Returns the length of a string excluding the null terminator.
Preprocessor
strlen()
continue
binary operator
20. A function that can be used to read character data including whitespace
cin.get(ch)
if
binary operator
const
21. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
auto
setw
binary operator
overloading
22. Allows the programmer to store a value in a variable
assignment statement
function overloading
selection
virtual functions
23. In inheritance the ____________ is the class that supplies the inherited members.
base class
&
<<
function scope
24. The process of determining if an array contains a particular key value is called _________ the array.
{ }
Arithmetic Operators
searching
mixed expression
25. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
like-type expression
reserved words
const
26. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
strcpy()
default constructor
this
preprocessor
27. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
if...else
endl (same as 'n')
stack
vectors
28. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
attributes
char
getline
editor
29. A human readable file that contains C++ program
integer operands
source file
srand
dot (.)
30. Creates a copy of a string.
cin.get(ch)
setw
strcpy()
fixed
31. 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
const
dot (.)
delete
32. int namespace include using return examples of ___________
reserve words
.cpp
function prototype
operand value
33. Lists and tables of values can be stored in arrays or __________.
break
return
vectors
void pointer
34. Used for dynamically allocated variables
assignment statement
scope resolution operator
subscript (or index)
heap
35. 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.
reserved words
beginning
ofstream
information hiding
36. Keyword public is a(n) _________
unary operator
access specifier
Sentinel
selection
37. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
operator overloading
const
classes
function overloading
38. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
?
switch
static
semantics
39. Every C++ program begins execution at the function _________.
Arithmetic Operators
char
main
left
40. data types that refer to numbers with decimals
floating-point
cin.get(ch)
editor
cin
41. Every C++ statement ends with a(n) _________.
function prototype
searching
semicolon
% modulus
42. A function is invoked with a ________.
heap
function call
binary operator
identifiers
43. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
::
polymorphism
cin >> variable
virtual functions
44. The stream extraction operator
before
>>
information hiding
semantics
45. A __________ should be used to declare the size of an array because it makes the program more scalable.
scope resolution operator
whitespace
static_cast<char>(65)
constant variable
46. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
strcpy()
#include <headerfilename>
prompt
47. Preprocessor directive syntax
#include <headerfilename>
classes
polymorphism
stack
48. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
break
register
operator overloading
if
49. = & | are examples of ____________.
special symbols
linker
register
unary scope resolution operator (::)
50. Message displayed to the screen asking user for input; generated with an output statement
static
scope resolution operator
this
prompt