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 write data to a file you define an object of which one of the following
integer operands
NULL
ofstream
escape sequences
2. Creates a copy of a string.
strcpy()
global
default constructor
escape sequences
3. 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.
editor
information hiding
polymorphism
pointer
4. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
endl (same as 'n')
function call
cin >> variable
heap
5. The process of analyzing and designing a system from an object-oriented point of view is called ________.
variables
object-oriented analysis and design (OOAD)
searching
if
6. If a member initializer is not provided for a member object of a class the object's __________ is called.
source file
two-dimensional
floating-point
default constructor
7. The ________ qualifier is used to declare read-only variables.
overloading
identifiers
if
const
8. To explicitly indicate that a value is to be converted to another type
*
strlen()
type casting (conversion)
a.out
9. A __________ should be used to declare the size of an array because it makes the program more scalable.
//
constant variable
attributes
main
10. 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
11. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
endl (same as 'n')
classes
function call
12. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
if...else
fstream
stack
new line
13. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
named constant
address
showpoint
Stack overflow
14. A memory location with a name and data type - its content may be changed during program execution
variable
cin >> variable
strcmp()
Arithmetic Operators
15. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
floating-point
preprocessor
polymorphism
16. You can declare default values for a function in the ____________________.
left
sorting
function parameters
<<
17. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
static
.cpp
associations
//
18. Every C++ statement ends with a(n) _________.
case sensitive
semicolon
static_cast<char>(65)
subscript (or index)
19. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
void pointer
operator
non-static
20. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
scope resolution operator
floating-point
new line
21. An expression in which all operands have the same data type - result will have the same data type as operands
#include directive
like-type expression
&
type
22. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
Stack overflow
variable
break
register
23. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
constant variable
t
heap
overloading
24. Function ________ is used to set the random number seed to randomize a program.
whitespace
strlen()
srand
private
25. Associate an identifier with a memory location
semantics
prompt
type
allocating memory
26. The _________ begins the body of every function and the _________ ends the body of every function.
::
register
access specifier
{ }
27. For every opening brace in a C++ program there must be a ______________.
reserve words
information hiding
assignment statement
Closing brace
28. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
/n
rand
special symbols
29. A C++ statement that makes a decision is ______.
void
editor
setw
if
30. This manipulator causes the field to be left-justified with padding spaces printed to the right.
case sensitive
member
left
globals
31. The symbol for the binary scope resolution operator
*
object-oriented analysis and design (OOAD)
::
Arithmetic Operators
32. Lists and tables of values can be stored in arrays or __________.
vectors
beginning
inline functions
function prototype
33. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
global
Sentinel
#include <headerfilename>
34. Nonexecutable statements that are included in a program to provide information about what the program does etc.
type
void
comments
rand
35. Initializers __________ must be used to initialize constant members of a class.
pointer
type coercion
member
function parameters
36. The sign you use for pointers
strlen()
*
member
.cpp
37. An operator that can only be used with int values. result will always be an int.
vectors
recursive
% modulus
&
38. Allows the programmer to store a value in a variable
case sensitive
if...else
continue
assignment statement
39. Operator with only one operand
/n
unary operator
static_cast<char>(65)
friend
40. Naming convention for C++ programs
operand value
inheritance
.cpp
derived class
41. The stream extraction operator
>>
template
named constant
pointer
42. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include
non-static
{ }
left
43. 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.
unary scope resolution operator (::)
const datatype identifier = value
static
getline
44. A type of pointer that can point at objects of any data type.
void pointer
&
object file
::
45. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
non-static
pointer
semantics
46. The only integer that can be assigned directly to a pointer is_____________.
subscript (or index)
static
0
type casting (conversion)
47. 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.
member
void
?
Counter-controlled or definite
48. Keyword public is a(n) _________
register
cin.get(ch)
initialized
access specifier
49. The stream insertion operator
Closing brace
function prototype
allocating memory
<<
50. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.
semicolon
continue
preprocessor
vectors
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