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. To write data to a file you define an object of which one of the following
cin.get(ch)
::
base class
ofstream
2. Allows the programmer to store a value in a variable
assignment statement
NULL
case sensitive
delete
3. A __________ data member represents class-wide information.
operand value
type casting (conversion)
static
overloading
4. A C++ statement that makes a decision is ______.
if
?
a.out
static_cast<char>(65)
5. Executable version of program
object file
virtual functions
overloading
switch
6. A filestream variable that represents the default input source
new line
cin
{ }
two-dimensional
7. Grammar rules of the language; compiler will try to identify and locate syntax errors
pointer
binary operator
semantics
syntax
8. Returns the length of a string excluding the null terminator.
function scope
strlen()
initialized
setw
9. Lists and tables of values can be stored in arrays or __________.
function overloading
auto
identifiers
vectors
10. The ________ program transfers the executable image of a C++ program from disk to memory.
cin
function parameters
loader
const datatype identifier = value
11. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
inline functions
0
type casting (conversion)
if...else
12. 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
Sentinel
Preprocessor
dot (.)
13. Preprocessor directive syntax
loader
function overloading
#include <headerfilename>
operator
14. 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
Literals
two-dimensional
base
if
15. All C++ Variables are_________.
pointer
function overloading
case sensitive
fstream
16. 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
Closing brace
% modulus
if
17. Use 2 characters to represent one
escape sequences
preprocessor
source file
strcpy()
18. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
n
constant variable
semantics
showpoint
19. Default name of executable file
prompt
a.out
constant variable
reserve words
20. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
new line
switch
default constructor
friend
21. A constant object must be __________; it cannot be modified after it is created.
sorting
Literals
initialized
cmath
22. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
rand
getline
type coercion
globals
23. The _____ causes the contents of another file to be inserted into a program.
semicolon
*
#include directive
recursive function
24. Every C++ statement ends with a(n) _________.
this
semicolon
preprocessor
return
25. Message displayed to the screen asking user for input; generated with an output statement
recursive
source file
local variable
prompt
26. Compares two strings and returns 0 if they are equal.
strcmp()
type
strcpy()
classes
27. The ________ of an identifier is the portion of the program in which the identifier can be used.
NULL
comments
scope
attributes
28. 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.
void
virtual functions
arithmetic expression
delete
29. Whole numbers - no decimals and no commas included
int values
reserved words
new line
strcmp()
30. The elements of an array are related by the fact that they have the same name and ___________.
sorting
Literals
type
#include directive
31. An operator that can only be used with int values. result will always be an int.
% modulus
like-type expression
function parameters
variables
32. The ________ program combines the output of the compiler with various library functions to produce an executable image.
linker
0
strcpy()
integer operands
33. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
fstream
operator overloading
t
34. The ________ qualifier is used to declare read-only variables.
stack
<<
const
before
35. The address-of operator. it is used to assign pointers and to print the address of variables.
cin
searching
static
&
36. The sign you use for pointers
*
inline functions
binary operator
public
37. The __________ operator reclaims memory previously allocated by new.
global
delete
preprocessor
function prototype
38. The symbol for the binary scope resolution operator
constant variable
::
&
Stack overflow
39. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
initialized
function scope
recursive function
register
40. * / % + -
const
Arithmetic Operators
const
/n
41. Initializers __________ must be used to initialize constant members of a class.
member
fixed
case sensitive
two-dimensional
42. The three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
recursive function
strlen()
continue
43. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
Sentinel
void
non-static
floating-point
44. Function ________ is used to set the random number seed to randomize a program.
srand
unary operator
named constant
attributes
45. A sequence of operands and operators that describe a calculation to be performed
arithmetic expression
editor
break
NULL
46. The process of determining if an array contains a particular key value is called _________ the array.
>>
non-static
searching
operator
47. data types that refer to numbers with decimals
constant variable
strcmp()
floating-point
definition
48. A ________ program executes before the compiler's translation phase begins.
unary scope resolution operator (::)
vectors
prompt
preprocessor
49. A function is invoked with a ________.
two-dimensional
reserved words
function call
inline functions
50. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
switch
object-oriented analysis and design (OOAD)
break
semantics
Sorry!:) No result found.
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