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 explicitly indicate that a value is to be converted to another type
non-static
type casting (conversion)
type
opened
2. To allow file access in a program you must #include this header file.
register
fstream
Literals
local variable
3. The ________ program transfers the executable image of a C++ program from disk to memory.
classes
loader
cin >> variable
whitespace
4. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
integer operands
char
main
reserve words
5. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
attributes
inline functions
.cpp
token
6. C++ programs are normally typed into a computer using a(n) ________ program.
.cpp
editor
non-static
heap
7. Sets floating-point values to a fixed decimal format
friend
initialized
fixed
pointer
8. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
base
function parameters
overloading
Semicolon
9. The ________ of an identifier is the portion of the program in which the identifier can be used.
//
fixed
function scope
scope
10. A variable that is known only within the function in which it is defined is called a ________.
local variable
continue
function overloading
endl (same as 'n')
11. Type casting syntax
variable
mixed expression
static_cast<char>(65)
reserve words
12. Words that are used for special purposes in a program
setw
reserved words
endl (same as 'n')
two-dimensional
13. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
function overloading
recursive function
left
14. Class members specified as _________ are accessible anywhere an object of the class is in scope.
dot (.)
NULL
a.out
public
15. The stream insertion operator
friend
associations
<<
getline
16. A variable that holds the address of another variable.
selection
derived class
vectors
pointer
17. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
allocating memory
0
register
const
18. Initializers __________ must be used to initialize constant members of a class.
member
initialized
semantics
unary operator
19. The three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
main
searching
&
20. 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
new line
named constant
subscript (or index)
21. 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.
named constant
template
Sentinel
::
22. The idea that you can call the same function and the output will depend on the type of object you're using.
const datatype identifier = value
data type
polymorphism
<<
23. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
Preprocessor
attributes
inline functions
.cpp
24. 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.
function prototype
?
Preprocessor
t
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. Creates a copy of a string.
editor
type
strcpy()
information hiding
27. Syntax for named constant declaration
globals
if
Semicolon
const datatype identifier = value
28. 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.
cout
static
prompt
char
29. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
non-static
friend
assignment
recursive function
30. The ________ statement in a called function passes the value of an expression back to the calling function.
new line
Arithmetic Operators
return
function prototype
31. In inheritance the ____________ is the class the receives the inherited members.
derived class
semantics
public
>>
32. A program that finds and attaches to your program the indicated libraries for compilation
endl (same as 'n')
preprocessor
Stack overflow
#include <headerfilename>
33. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
showpoint
cin >> variable
sorting
beginning
34. Grammar rules of the language; compiler will try to identify and locate syntax errors
object-oriented analysis and design (OOAD)
syntax
sorting
case sensitive
35. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
searching
definition
return
srand
36. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
variable
void
#include directive
if
37. Program components in C++ are called functions and ________.
case sensitive
classes
prompt
operand value
38. The symbol for the binary scope resolution operator
return
source file
::
function prototype
39. = & | are examples of ____________.
non-static
special symbols
#include <headerfilename>
virtual functions
40. Associate an identifier with a memory location
allocating memory
function parameters
&
const
41. Operator with only one operand
function parameters
unary operator
non-static
named constant
42. Member objects are constructed __________ their enclosing class object.
escape sequences
inline functions
before
ofstream
43. This is used to mark the end of a complete C++ programming statement.
escape sequences
char
Semicolon
named constant
44. In inheritance the ____________ is the class that supplies the inherited members.
semantics
heap
base class
&
45. An operator that can only be used with int values. result will always be an int.
operand value
% modulus
binary operator
register
46. All C++ Variables are_________.
public
classes
Unified Modeling Language(UML)
case sensitive
47. Used for function calls and local variables
left
syntax
showpoint
stack
48. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
char
comments
semicolon
auto
49. Classes can have relationships with other classes. These relationships are called ________.
friend
*
inline functions
associations
50. An array that uses two subscripts is referred to as a(n) _________ array.
linker
classes
two-dimensional
continue
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