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. Two slash marks ( // ) indicate __________ of a comment
definition
beginning
cin >> variable
heap
2. directive A statement that starts with a # is called a ____________.
function parameters
Preprocessor
fixed
endl (same as 'n')
3. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
NULL
Stack overflow
sorting
two-dimensional
4. Grammar rules of the language; compiler will try to identify and locate syntax errors
register
Unified Modeling Language(UML)
syntax
function prototype
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.
member
virtual functions
NULL
Unified Modeling Language(UML)
6. A __________ should be used to declare the size of an array because it makes the program more scalable.
this
constant variable
private
allocating memory
7. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
t
/n
new line
% modulus
8. Identifier or expression that is part of the calculation to be performed
Preprocessor
sorting
operand value
binary operator
9. A set of values together with a set of operations
getline
const
data type
linker
10. For every opening brace in a C++ program there must be a ______________.
getline
NULL
Closing brace
binary operator
11. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
break
linker
strcpy()
unary scope resolution operator (::)
12. 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.
loader
#include directive
?
Default memberwise assignment
13. Every C++ program begins execution at the function _________.
/n
main
base
function prototype
14. An expression that has operands with different data types
prompt
heap
mixed expression
semantics
15. The stream extraction operator
>>
strlen()
token
scope
16. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
scope
token
Sentinel
template
17. 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.
const
continue
/n
variables
18. Most calculations are normally performed by ______ statements.
stack
arithmetic expression
assignment
classes
19. A C++ statement that makes a decision is ______.
Closing brace
Default memberwise assignment
if
left
20. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
void pointer
like-type expression
classes
21. 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
22. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
cout
showpoint
information hiding
selection
23. 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.
mixed expression
before
Sentinel
special symbols
24. A function that can be used to read character data including whitespace
function scope
operand value
cin.get(ch)
address
25. 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.
information hiding
dot (.)
function parameters
arithmetic expression
26. __________ can be used to assign an object of a class to another object of the same class.
searching
fstream
Default memberwise assignment
base
27. A __________ data member represents class-wide information.
function overloading
default constructor
Arithmetic Operators
static
28. Use 2 characters to represent one
operand value
identifiers
integer operands
escape sequences
29. Sets floating-point values to a fixed decimal format
subscript (or index)
fixed
cin >> variable
return
30. int namespace include using return examples of ___________
globals
editor
binary operator
reserve words
31. data types that refer to numbers with decimals
mixed expression
floating-point
subscript (or index)
static
32. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
cout
cin >> variable
loader
33. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
.cpp
//
derived class
classes
34. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
member
#include
syntax
special symbols
35. 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
editor
int values
cout
36. Keyword public is a(n) _________
access specifier
?
like-type expression
member
37. Nonexecutable statements that are included in a program to provide information about what the program does etc.
overloading
comments
prompt
polymorphism
38. newline
n
delete
binary operator
function overloading
39. A program that finds and attaches to your program the indicated libraries for compilation
base class
preprocessor
Default memberwise assignment
semicolon
40. Whole numbers - no decimals and no commas included
access specifier
strcmp()
int values
function call
41. Associate an identifier with a memory location
strlen()
allocating memory
polymorphism
local variable
42. Creates a copy of a string.
arithmetic expression
strcpy()
public
if
43. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
special symbols
Unified Modeling Language(UML)
&
friend
44. The stream insertion operator
selection
fixed
<<
linker
45. Operator with only one operand
unary operator
friend
access specifier
public
46. The _____ causes the contents of another file to be inserted into a program.
#include directive
void
default constructor
base class
47. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
cin.get(ch)
private
int values
classes
48. The only integer that can be assigned directly to a pointer is_____________.
0
mixed expression
global
break
49. An operator that can only be used with int values. result will always be an int.
void
auto
ofstream
% modulus
50. Symbol that denotes an action to be performed
Sentinel
non-static
getline
operator