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. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
binary operator
object file
getline
return
2. * / % + -
stack
register
Arithmetic Operators
left
3. A variable that holds the address of another variable.
#include directive
searching
pointer
recursive function
4. newline
n
arithmetic expression
data type
Unified Modeling Language(UML)
5. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
delete
unary scope resolution operator (::)
selection
6. You can declare default values for a function in the ____________________.
function call
cout
function parameters
>>
7. The elements of an array are related by the fact that they have the same name and ___________.
information hiding
const
semantics
type
8. int namespace include using return examples of ___________
object-oriented analysis and design (OOAD)
{ }
inline functions
reserve words
9. Most calculations are normally performed by ______ statements.
cout
new line
assignment
operand value
10. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
two-dimensional
unary scope resolution operator (::)
stack
friend
11. A memory location with a name and data type - its content may be changed during program execution
allocating memory
comments
void
variable
12. Allows the programmer to store a value in a variable
identifiers
static
assignment statement
n
13. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
showpoint
identifiers
break
::
14. Sets floating-point values to a fixed decimal format
overloading
Default memberwise assignment
type
fixed
15. Forces the computer to display decimal point and trailing zeroes
loader
showpoint
initialized
member
16. Used for function calls and local variables
stack
function overloading
local variable
cout
17. Identifier or expression that is part of the calculation to be performed
#include <headerfilename>
unary operator
named constant
operand value
18. The idea that you can call the same function and the output will depend on the type of object you're using.
cin >> variable
void pointer
scope resolution operator
polymorphism
19. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
function scope
strlen()
char
switch
20. This manipulator is used to establish a field width for the value immediately following it.
strcpy()
fstream
special symbols
setw
21. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
integer operands
definition
prompt
function overloading
22. 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.
allocating memory
virtual functions
break
information hiding
23. A filestream variable that represents the default input source
identifiers
::
% modulus
cin
24. Header file that contains commonly performed mathematical functions
prompt
a.out
cmath
function parameters
25. Executable version of program
register
object file
pointer
new line
26. 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
local variable
semantics
base
Sentinel
27. C++ programs are normally typed into a computer using a(n) ________ program.
editor
heap
>>
{ }
28. Nonexecutable statements that are included in a program to provide information about what the program does etc.
void pointer
comments
strcmp()
vectors
29. Classes can have relationships with other classes. These relationships are called ________.
associations
base
int values
n
30. A function that calls itself
recursive function
unary operator
this
<<
31. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
Closing brace
constant variable
selection
break
32. Default name of executable file
inheritance
a.out
::
static
33. These are data items whose values do not change while the program is running
loader
//
non-static
Literals
34. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
int values
polymorphism
searching
function scope
35. 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.
associations
object-oriented analysis and design (OOAD)
static
syntax
36. 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.
a.out
const
/n
ofstream
37. Message displayed to the screen asking user for input; generated with an output statement
identifiers
prompt
loader
Default memberwise assignment
38. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
friend
switch
stack
if...else
39. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
switch
cin >> variable
token
Arithmetic Operators
40. The _____ causes the contents of another file to be inserted into a program.
function prototype
0
#include directive
function scope
41. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
endl (same as 'n')
vectors
fstream
42. A function ________ enables a single function to be defined to perform a task on many different data types.
template
local variable
&
Preprocessor
43. Whole numbers - no decimals and no commas included
sorting
function parameters
::
int values
44. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
fixed
Preprocessor
default constructor
45. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
a.out
classes
pointer
assignment
46. The stream insertion operator
default constructor
char
strcmp()
<<
47. The ________ program combines the output of the compiler with various library functions to produce an executable image.
assignment
binary operator
linker
return
48. The three values that can be used to initialize a pointer are 0 - __________ and an address.
private
variable
//
NULL
49. The ________ of an identifier is the portion of the program in which the identifier can be used.
inheritance
scope
fstream
static
50. Compares two strings and returns 0 if they are equal.
named constant
strcmp()
void
const datatype identifier = value
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