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. Compares two strings and returns 0 if they are equal.
sorting
continue
strcmp()
0
2. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
dot (.)
getline
char
beginning
3. A type of pointer that can point at objects of any data type.
{ }
getline
before
void pointer
4. Most calculations are normally performed by ______ statements.
operator
default constructor
assignment
Literals
5. 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
function prototype
#include
ofstream
6. Every C++ statement ends with a(n) _________.
prompt
object file
NULL
semicolon
7. All ______ must be declared before they are used.
Default memberwise assignment
main
variables
function parameters
8. Forces the computer to display decimal point and trailing zeroes
strcpy()
inheritance
getline
showpoint
9. 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
continue
ofstream
type casting (conversion)
10. Keyword public is a(n) _________
Default memberwise assignment
recursive function
access specifier
.cpp
11. Used for dynamically allocated variables
access specifier
heap
function call
% modulus
12. Associate an identifier with a memory location
allocating memory
auto
base
pointer
13. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
polymorphism
floating-point
pointer
stack
14. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
object-oriented analysis and design (OOAD)
unary scope resolution operator (::)
cin.get(ch)
15. The ________ statement in a called function passes the value of an expression back to the calling function.
register
return
classes
base
16. In inheritance the ____________ is the class that supplies the inherited members.
scope
floating-point
public
base class
17. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
opened
comments
const
static_cast<char>(65)
18. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
{ }
Unified Modeling Language(UML)
identifiers
.cpp
19. The sign you use for references
&
data type
int values
whitespace
20. To explicitly indicate that a value is to be converted to another type
non-static
type casting (conversion)
strlen()
virtual functions
21. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
n
semantics
function prototype
operand value
22. The ________ of an identifier is the portion of the program in which the identifier can be used.
scope
object file
virtual functions
Sentinel
23. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
semantics
function scope
loader
special symbols
24. A member function should be declared static if it does not access __________ class members.
strcmp()
non-static
data type
<<
25. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
classes
arithmetic expression
token
semicolon
26. int namespace include using return examples of ___________
static_cast<char>(65)
reserve words
ofstream
/n
27. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
member
syntax
/n
globals
28. A __________ should be used to declare the size of an array because it makes the program more scalable.
recursive
semicolon
constant variable
reserve words
29. The process of placing the elements of an array in order is called ________ the array.
int values
&
preprocessor
sorting
30. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
void
n
void
named constant
31. Initializers __________ must be used to initialize constant members of a class.
member
non-static
reserve words
overloading
32. __________ can be used to assign an object of a class to another object of the same class.
Sentinel
Default memberwise assignment
default constructor
globals
33. A constant object must be __________; it cannot be modified after it is created.
object-oriented analysis and design (OOAD)
initialized
public
searching
34. An operator that can only be used with int values. result will always be an int.
*
% modulus
default constructor
Sentinel
35. Characters used to separate symbols or reserved words or identifiers and statements
&
Semicolon
whitespace
return
36. Function ________ is used to set the random number seed to randomize a program.
default constructor
srand
operand value
sorting
37. For every opening brace in a C++ program there must be a ______________.
void
Closing brace
pointer
Preprocessor
38. A program that finds and attaches to your program the indicated libraries for compilation
case sensitive
preprocessor
named constant
switch
39. The _____ causes the contents of another file to be inserted into a program.
a.out
*
#include directive
Preprocessor
40. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
before
syntax
const
void
41. When a value of one data type is implicitly (automatically) changed to another data type
getline
type coercion
Preprocessor
Semicolon
42. Default name of executable file
<<
public
a.out
delete
43. Symbol that denotes an action to be performed
setw
subscript (or index)
cin >> variable
operator
44. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
fixed
endl (same as 'n')
classes
register
45. 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.
?
variables
like-type expression
::
46. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
//
access specifier
comments
this
47. Naming convention for C++ programs
.cpp
friend
Literals
% modulus
48. The ________ program transfers the executable image of a C++ program from disk to memory.
delete
loader
floating-point
base
49. You can declare default values for a function in the ____________________.
preprocessor
function parameters
return
function call
50. Header file that contains commonly performed mathematical functions
base
before
cmath
globals
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