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. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
ofstream
cin >> variable
preprocessor
if
2. This manipulator is used to establish a field width for the value immediately following it.
setw
base
fixed
strcmp()
3. Whole numbers - no decimals and no commas included
?
#include
//
int values
4. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
new line
char
pointer
constant variable
5. An expression that has operands with different data types
#include directive
escape sequences
<<
mixed expression
6. Symbol that denotes an action to be performed
classes
static
operator
subscript (or index)
7. An array that uses two subscripts is referred to as a(n) _________ array.
assignment statement
const
operator overloading
two-dimensional
8. The ________ statement in a called function passes the value of an expression back to the calling function.
delete
base class
information hiding
return
9. These are data items whose values do not change while the program is running
Literals
globals
pointer
special symbols
10. A file must be ________ before data can be written to or read from it.
global
opened
linker
&
11. In inheritance the ____________ is the class the receives the inherited members.
inline functions
.cpp
derived class
static_cast<char>(65)
12. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
cout
member
static
//
13. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
cin >> variable
new line
int values
public
14. = & | are examples of ____________.
{ }
special symbols
getline
identifiers
15. Repeating a set of instructions a specific number of times is called_________repetition.
searching
ofstream
Counter-controlled or definite
recursive function
16. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.
?
a.out
Stack overflow
register
17. A __________ should be used to declare the size of an array because it makes the program more scalable.
0
Preprocessor
const datatype identifier = value
constant variable
18. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
main
function scope
register
strcmp()
19. Classes can have relationships with other classes. These relationships are called ________.
Arithmetic Operators
associations
binary operator
member
20. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
type
mixed expression
function scope
const
21. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.
virtual functions
Stack overflow
>>
named constant
22. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
sorting
strlen()
private
function parameters
23. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
function prototype
getline
t
this
24. Associate an identifier with a memory location
global
void
overloading
allocating memory
25. 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.
function parameters
dot (.)
fstream
stack
26. 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.
function prototype
inheritance
cin.get(ch)
public
27. 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.
vectors
/n
preprocessor
global
28. The process of determining if an array contains a particular key value is called _________ the array.
searching
const datatype identifier = value
template
access specifier
29. A set of values together with a set of operations
data type
endl (same as 'n')
reserved words
editor
30. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
return
searching
non-static
semantics
31. You can declare default values for a function in the ____________________.
Semicolon
//
function parameters
member
32. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
definition
static
return
switch
33. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
floating-point
inline functions
#include directive
case sensitive
34. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
mixed expression
member
break
const
35. Nonexecutable statements that are included in a program to provide information about what the program does etc.
vectors
comments
0
case sensitive
36. The only integer that can be assigned directly to a pointer is_____________.
constant variable
0
#include directive
member
37. Class members specified as _________ are accessible anywhere an object of the class is in scope.
cmath
type casting (conversion)
public
reserve words
38. Grammar rules of the language; compiler will try to identify and locate syntax errors
initialized
register
syntax
private
39. To allow file access in a program you must #include this header file.
fstream
reserve words
#include <headerfilename>
named constant
40. 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
attributes
break
globals
41. A ________ program executes before the compiler's translation phase begins.
default constructor
auto
const
preprocessor
42. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call
base
assignment statement
recursive
fixed
43. The ________ program combines the output of the compiler with various library functions to produce an executable image.
auto
linker
recursive
const
44. A C++ statement that makes a decision is ______.
if
Preprocessor
variables
#include
45. 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
mixed expression
void
register
46. Lists and tables of values can be stored in arrays or __________.
allocating memory
unary scope resolution operator (::)
vectors
Literals
47. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
classes
?
operator overloading
data type
48. Use 2 characters to represent one
pointer
function parameters
escape sequences
assignment
49. The sign you use for pointers
recursive function
operator overloading
const
*
50. A variable that is known only within the function in which it is defined is called a ________.
stack
local variable
cin >> variable
base class
Can you answer 50 questions in 15 minutes?
Let me suggest you:
Browse all subjects
Browse all tests
Most popular tests
Major Subjects
Tests & Exams
AP
CLEP
DSST
GRE
SAT
GMAT
Certifications
CISSP go to https://www.isc2.org/
PMP
ITIL
RHCE
MCTS
More...
IT Skills
Android Programming
Data Modeling
Objective C Programming
Basic Python Programming
Adobe Illustrator
More...
Business Skills
Advertising Techniques
Business Accounting Basics
Business Strategy
Human Resource Management
Marketing Basics
More...
Soft Skills
Body Language
People Skills
Public Speaking
Persuasion
Job Hunting And Resumes
More...
Vocabulary
GRE Vocab
SAT Vocab
TOEFL Essential Vocab
Basic English Words For All
Global Words You Should Know
Business English
More...
Languages
AP German Vocab
AP Latin Vocab
SAT Subject Test: French
Italian Survival
Norwegian Survival
More...
Engineering
Audio Engineering
Computer Science Engineering
Aerospace Engineering
Chemical Engineering
Structural Engineering
More...
Health Sciences
Basic Nursing Skills
Health Science Language Fundamentals
Veterinary Technology Medical Language
Cardiology
Clinical Surgery
More...
English
Grammar Fundamentals
Literary And Rhetorical Vocab
Elements Of Style Vocab
Introduction To English Major
Complete Advanced Sentences
Literature
Homonyms
More...
Math
Algebra Formulas
Basic Arithmetic: Measurements
Metric Conversions
Geometric Properties
Important Math Facts
Number Sense Vocab
Business Math
More...
Other Major Subjects
Science
Economics
History
Law
Performing-arts
Cooking
Logic & Reasoning
Trivia
Browse all subjects
Browse all tests
Most popular tests