SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
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 ___________.
left
scope resolution operator
type
Semicolon
2. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
floating-point
0
case sensitive
selection
3. 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.
&
a.out
inheritance
scope
4. A sequence of operands and operators that describe a calculation to be performed
source file
#include <headerfilename>
classes
arithmetic expression
5. Words that are used for special purposes in a program
register
cin.get(ch)
initialized
reserved words
6. A member function should be declared static if it does not access __________ class members.
semantics
setw
Literals
non-static
7. The process of analyzing and designing a system from an object-oriented point of view is called ________.
void
#include
base class
object-oriented analysis and design (OOAD)
8. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
return
reserved words
main
9. Classes can have relationships with other classes. These relationships are called ________.
semicolon
constant variable
associations
allocating memory
10. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
escape sequences
named constant
auto
access specifier
11. The ________ program transfers the executable image of a C++ program from disk to memory.
heap
fixed
inheritance
loader
12. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
Closing brace
dot (.)
polymorphism
13. 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.
syntax
continue
switch
#include <headerfilename>
14. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
pointer
address
cin
friend
15. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
escape sequences
classes
assignment
information hiding
16. The ________ qualifier is used to declare read-only variables.
scope
globals
const
attributes
17. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
void pointer
pointer
Closing brace
18. 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
whitespace
opened
return
19. Keyword public is a(n) _________
access specifier
setw
dot (.)
ofstream
20. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
integer operands
function parameters
//
void
21. The sign you use for pointers
*
constant variable
return
vectors
22. An expression that has operands with different data types
mixed expression
semicolon
return
syntax
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.
integer operands
fstream
break
subscript (or index)
24. A C++ statement that makes a decision is ______.
if
t
vectors
strcmp()
25. The storage-class specifiers are mutable - auto - ________ - extern and static.
{ }
continue
register
function overloading
26. C++ programs are normally typed into a computer using a(n) ________ program.
assignment
editor
a.out
/n
27. Used for function calls and local variables
scope resolution operator
stack
definition
scope
28. The _____ causes the contents of another file to be inserted into a program.
strcmp()
template
#include directive
*
29. 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.
static_cast<char>(65)
Counter-controlled or definite
dot (.)
Semicolon
30. 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
register
loader
strcpy()
31. You can declare default values for a function in the ____________________.
sorting
definition
base class
function parameters
32. A pointer is a variable that contains as its value the____________ of another variable.
address
cmath
inheritance
return
33. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
new line
token
showpoint
function call
34. To write data to a file you define an object of which one of the following
strlen()
ofstream
auto
scope
35. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
#include
scope resolution operator
if
getline
36. A filestream variable that represents the default input source
cin
.cpp
unary scope resolution operator (::)
attributes
37. The ________ statement in a called function passes the value of an expression back to the calling function.
return
strcpy()
const
unary operator
38. Characters used to separate symbols or reserved words or identifiers and statements
fixed
whitespace
cin
polymorphism
39. The process of determining if an array contains a particular key value is called _________ the array.
searching
&
identifiers
classes
40. A __________ should be used to declare the size of an array because it makes the program more scalable.
pointer
constant variable
&
void
41. A human readable file that contains C++ program
source file
Sentinel
if
polymorphism
42. Header file that contains commonly performed mathematical functions
Unified Modeling Language(UML)
cmath
object-oriented analysis and design (OOAD)
allocating memory
43. A filestream variable that represents the default output device
cout
global
token
static
44. All C++ Variables are_________.
&
strlen()
case sensitive
.cpp
45. Compares two strings and returns 0 if they are equal.
Unified Modeling Language(UML)
strcmp()
virtual functions
assignment statement
46. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
function prototype
Closing brace
unary operator
47. Associate an identifier with a memory location
switch
vectors
void pointer
allocating memory
48. Every C++ program begins execution at the function _________.
Closing brace
register
main
unary scope resolution operator (::)
49. Repeating a set of instructions a specific number of times is called_________repetition.
prompt
cmath
continue
Counter-controlled or definite
50. This manipulator is used to establish a field width for the value immediately following it.
setw
return
inheritance
strlen()