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. 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
2. You can declare default values for a function in the ____________________.
named constant
function parameters
subscript (or index)
new line
3. Type casting syntax
friend
static_cast<char>(65)
template
allocating memory
4. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
recursive
pointer
linker
return
5. The size & shape & color and weight of an object are considered
preprocessor
inheritance
attributes
strlen()
6. The ________ program combines the output of the compiler with various library functions to produce an executable image.
Arithmetic Operators
#include
opened
linker
7. You must have a ___________ for every variable you intend to use in a program
{ }
definition
sorting
non-static
8. The process of determining if an array contains a particular key value is called _________ the array.
pointer
recursive function
searching
showpoint
9. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
const
escape sequences
semantics
getline
10. An operator that can only be used with int values. result will always be an int.
pointer
virtual functions
information hiding
% modulus
11. Grammar rules of the language; compiler will try to identify and locate syntax errors
base
t
syntax
n
12. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
beginning
escape sequences
main
register
13. newline
semantics
n
source file
case sensitive
14. Allows the programmer to store a value in a variable
recursive function
assignment statement
access specifier
Preprocessor
15. The ________ program transfers the executable image of a C++ program from disk to memory.
strcmp()
recursive
loader
getline
16. Every C++ program begins execution at the function _________.
overloading
main
left
initialized
17. int namespace include using return examples of ___________
% modulus
non-static
reserve words
::
18. A function that can be used to read character data including whitespace
strcpy()
function scope
.cpp
cin.get(ch)
19. Function ________ is used to set the random number seed to randomize a program.
definition
srand
#include directive
assignment
20. C++ programs are normally typed into a computer using a(n) ________ program.
if
whitespace
editor
template
21. 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.
rand
void
main
Stack overflow
22. The ________ statement in a called function passes the value of an expression back to the calling function.
return
object-oriented analysis and design (OOAD)
scope
allocating memory
23. 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.
vectors
ofstream
?
operator
24. Syntax for named constant declaration
if
whitespace
const datatype identifier = value
floating-point
25. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function overloading
definition
Stack overflow
function prototype
26. A member function should be declared static if it does not access __________ class members.
non-static
public
unary scope resolution operator (::)
operand value
27. Use 2 characters to represent one
virtual functions
pointer
base class
escape sequences
28. To allow file access in a program you must #include this header file.
classes
fstream
srand
ofstream
29. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
token
reserve words
break
private
30. Nonexecutable statements that are included in a program to provide information about what the program does etc.
void pointer
comments
if
static
31. Compares two strings and returns 0 if they are equal.
NULL
function overloading
heap
strcmp()
32. The modulus operator (%) can be used only with __________.
integer operands
NULL
break
>>
33. Two slash marks ( // ) indicate __________ of a comment
const datatype identifier = value
beginning
non-static
{ }
34. Keyword public is a(n) _________
showpoint
access specifier
cout
/n
35. The process of analyzing and designing a system from an object-oriented point of view is called ________.
endl (same as 'n')
floating-point
function scope
object-oriented analysis and design (OOAD)
36. To write data to a file you define an object of which one of the following
#include directive
ofstream
reserve words
Stack overflow
37. A variable that is known only within the function in which it is defined is called a ________.
comments
local variable
rand
semantics
38. When a value of one data type is implicitly (automatically) changed to another data type
char
{ }
type coercion
getline
39. Classes can have relationships with other classes. These relationships are called ________.
const
::
associations
Literals
40. Associate an identifier with a memory location
operator overloading
% modulus
allocating memory
const
41. A set of values together with a set of operations
subscript (or index)
NULL
data type
dot (.)
42. A file must be ________ before data can be written to or read from it.
opened
#include directive
cin.get(ch)
variables
43. Executable version of program
object file
getline
t
void pointer
44. This manipulator is used to establish a field width for the value immediately following it.
setw
non-static
identifiers
::
45. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
subscript (or index)
associations
named constant
46. A variable that holds the address of another variable.
srand
getline
pointer
register
47. The ________ of an identifier is the portion of the program in which the identifier can be used.
overloading
scope
NULL
::
48. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
0
endl (same as 'n')
beginning
49. These are data items whose values do not change while the program is running
&
searching
this
Literals
50. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
variable
cin >> variable
switch
type coercion
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