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. This manipulator causes the field to be left-justified with padding spaces printed to the right.
rand
identifiers
function overloading
left
2. The modulus operator (%) can be used only with __________.
two-dimensional
#include
integer operands
subscript (or index)
3. A pointer is a variable that contains as its value the____________ of another variable.
*
address
variable
opened
4. Program components in C++ are called functions and ________.
object file
classes
public
Semicolon
5. A variable that holds the address of another variable.
.cpp
pointer
operand value
>>
6. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
::
strcmp()
member
7. 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.
endl (same as 'n')
delete
cin >> variable
void
8. tab
static
public
ofstream
t
9. 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
dot (.)
vectors
information hiding
10. data types that refer to numbers with decimals
arithmetic expression
floating-point
case sensitive
semantics
11. To allow file access in a program you must #include this header file.
object file
fstream
Stack overflow
n
12. The _____ causes the contents of another file to be inserted into a program.
{ }
showpoint
register
#include directive
13. Classes can have relationships with other classes. These relationships are called ________.
special symbols
associations
information hiding
new line
14. A __________ should be used to declare the size of an array because it makes the program more scalable.
static
recursive function
floating-point
constant variable
15. A constant object must be __________; it cannot be modified after it is created.
void pointer
register
reserved words
initialized
16. * / % + -
Arithmetic Operators
Closing brace
Semicolon
Literals
17. The process of determining if an array contains a particular key value is called _________ the array.
inline functions
searching
friend
/n
18. Message displayed to the screen asking user for input; generated with an output statement
prompt
mixed expression
>>
global
19. The process of analyzing and designing a system from an object-oriented point of view is called ________.
opened
type
object-oriented analysis and design (OOAD)
switch
20. Initializers __________ must be used to initialize constant members of a class.
loader
Preprocessor
function scope
member
21. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
overloading
definition
Stack overflow
#include
22. Nonexecutable statements that are included in a program to provide information about what the program does etc.
local variable
comments
strcmp()
function parameters
23. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
type
const datatype identifier = value
cin >> variable
24. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function overloading
this
address
strcpy()
25. Executable version of program
fstream
arithmetic expression
object file
static
26. A program that finds and attaches to your program the indicated libraries for compilation
fixed
Default memberwise assignment
preprocessor
a.out
27. 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
main
base class
28. Forces the computer to display decimal point and trailing zeroes
this
vectors
static
showpoint
29. A variable that is known only within the function in which it is defined is called a ________.
strlen()
const datatype identifier = value
local variable
overloading
30. 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
Counter-controlled or definite
recursive
virtual functions
31. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
delete
<<
polymorphism
32. Use 2 characters to represent one
constant variable
escape sequences
return
semicolon
33. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
base class
token
private
continue
34. A variable declared outside any block or function is a ________ variable.
cin.get(ch)
function parameters
endl (same as 'n')
global
35. In inheritance the ____________ is the class that supplies the inherited members.
Closing brace
beginning
base class
heap
36. The only integer that can be assigned directly to a pointer is_____________.
classes
associations
0
*
37. In inheritance the ____________ is the class the receives the inherited members.
cmath
cin
subscript (or index)
derived class
38. A member function should be declared static if it does not access __________ class members.
static
Sentinel
non-static
endl (same as 'n')
39. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
Arithmetic Operators
function scope
integer operands
globals
40. Used to qualify hidden names so that they can be used.
whitespace
variables
scope resolution operator
Preprocessor
41. Used for dynamically allocated variables
information hiding
heap
fixed
default constructor
42. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
dot (.)
return
recursive function
&
43. Keyword public is a(n) _________
t
linker
access specifier
int values
44. An expression in which all operands have the same data type - result will have the same data type as operands
allocating memory
like-type expression
left
showpoint
45. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
identifiers
getline
initialized
assignment
46. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.
function call
inheritance
classes
variable
47. A human readable file that contains C++ program
switch
main
source file
prompt
48. Allows the programmer to store a value in a variable
assignment statement
a.out
semicolon
special symbols
49. The stream insertion operator
reserved words
classes
Sentinel
<<
50. To write data to a file you define an object of which one of the following
type
recursive function
break
ofstream
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