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. Operator with two operands
object file
binary operator
function parameters
getline
2. This manipulator is used to establish a field width for the value immediately following it.
setw
//
object file
register
3. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
two-dimensional
vectors
char
searching
4. A __________ should be used to declare the size of an array because it makes the program more scalable.
overloading
token
constant variable
cmath
5. 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.
address
inline functions
non-static
?
6. 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
int values
variables
7. The number used to refer to a particular element of an array is called its ________.
Arithmetic Operators
variables
polymorphism
subscript (or index)
8. Whole numbers - no decimals and no commas included
vectors
case sensitive
classes
int values
9. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
initialized
inline functions
static
register
10. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
continue
/n
address
11. The address-of operator. it is used to assign pointers and to print the address of variables.
&
delete
Counter-controlled or definite
Sentinel
12. A variable that holds the address of another variable.
0
strlen()
arithmetic expression
pointer
13. Used to qualify hidden names so that they can be used.
scope resolution operator
opened
type coercion
cin
14. Creates a copy of a string.
subscript (or index)
strcpy()
constant variable
scope
15. Preprocessor directive syntax
if
NULL
#include <headerfilename>
Stack overflow
16. Keyword public is a(n) _________
auto
address
scope resolution operator
access specifier
17. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
pointer
#include
getline
type
18. A C++ statement that makes a decision is ______.
if
return
derived class
t
19. 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.
operator overloading
pointer
escape sequences
dot (.)
20. Naming convention for C++ programs
prompt
searching
non-static
.cpp
21. A function is invoked with a ________.
mixed expression
Stack overflow
getline
function call
22. A function ________ enables a single function to be defined to perform a task on many different data types.
arithmetic expression
private
const
template
23. The ________ statement in a called function passes the value of an expression back to the calling function.
base
assignment
return
strcpy()
24. To write data to a file you define an object of which one of the following
opened
address
mixed expression
ofstream
25. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
26. Syntax for named constant declaration
fstream
function scope
const datatype identifier = value
% modulus
27. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
strlen()
operand value
&
//
28. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
::
derived class
object-oriented analysis and design (OOAD)
29. The stream insertion operator
<<
NULL
preprocessor
*
30. Repeating a set of instructions a specific number of times is called_________repetition.
global
switch
this
Counter-controlled or definite
31. 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.
srand
recursive
Default memberwise assignment
virtual functions
32. Grammar rules of the language; compiler will try to identify and locate syntax errors
if...else
syntax
#include <headerfilename>
register
33. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
static
opened
before
void
34. A filestream variable that represents the default input source
subscript (or index)
classes
cin
pointer
35. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
operator overloading
token
operand value
36. 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
access specifier
variables
strlen()
37. An expression that has operands with different data types
global
a.out
mixed expression
access specifier
38. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
polymorphism
globals
cout
strlen()
39. A pointer is a variable that contains as its value the____________ of another variable.
address
const datatype identifier = value
return
static_cast<char>(65)
40. Used for dynamically allocated variables
pointer
<<
heap
0
41. A filestream variable that represents the default output device
whitespace
Unified Modeling Language(UML)
cout
0
42. The three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
{ }
recursive function
local variable
43. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
dot (.)
this
before
44. A memory location with a name and data type - its content may be changed during program execution
variable
getline
reserved words
/n
45. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
type coercion
attributes
operand value
46. directive A statement that starts with a # is called a ____________.
Preprocessor
strcmp()
showpoint
token
47. A variable declared outside any block or function is a ________ variable.
register
global
case sensitive
linker
48. The ________ program combines the output of the compiler with various library functions to produce an executable image.
Counter-controlled or definite
linker
variables
unary scope resolution operator (::)
49. All C++ Variables are_________.
auto
associations
return
case sensitive
50. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
recursive
t
strcpy()
operator overloading
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