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. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
&
cin >> variable
opened
left
2. Used for function calls and local variables
data type
stack
return
<<
3. C++ programs are normally typed into a computer using a(n) ________ program.
return
private
char
editor
4. Characters used to separate symbols or reserved words or identifiers and statements
classes
whitespace
cin.get(ch)
Preprocessor
5. A variable declared outside any block or function is a ________ variable.
object file
before
global
template
6. The stream insertion operator
operand value
object file
sorting
<<
7. The elements of an array are related by the fact that they have the same name and ___________.
const
setw
continue
type
8. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
mixed expression
?
linker
9. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
sorting
function prototype
return
#include <headerfilename>
10. If a member initializer is not provided for a member object of a class the object's __________ is called.
public
strlen()
default constructor
initialized
11. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
a.out
named constant
derived class
12. Two slash marks ( // ) indicate __________ of a comment
sorting
beginning
initialized
Counter-controlled or definite
13. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
#include directive
polymorphism
char
this
14. A human readable file that contains C++ program
continue
function parameters
switch
source file
15. A member function should be declared static if it does not access __________ class members.
Closing brace
cmath
non-static
address
16. A memory location with a name and data type - its content may be changed during program execution
variable
new line
strlen()
allocating memory
17. A C++ statement that makes a decision is ______.
&
variables
overloading
if
18. 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.
identifiers
definition
Sentinel
friend
19. 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.
const datatype identifier = value
&
scope
virtual functions
20. __________ can be used to assign an object of a class to another object of the same class.
Default memberwise assignment
unary scope resolution operator (::)
Arithmetic Operators
member
21. Operator with only one operand
unary operator
integer operands
Unified Modeling Language(UML)
access specifier
22. The number used to refer to a particular element of an array is called its ________.
Sentinel
void
subscript (or index)
#include <headerfilename>
23. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
register
cout
type casting (conversion)
Unified Modeling Language(UML)
24. This is used to mark the end of a complete C++ programming statement.
&
n
Semicolon
static
25. An array that uses two subscripts is referred to as a(n) _________ array.
a.out
assignment statement
subscript (or index)
two-dimensional
26. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
inheritance
selection
dot (.)
mixed expression
27. Message displayed to the screen asking user for input; generated with an output statement
prompt
base class
preprocessor
type coercion
28. The ________ program combines the output of the compiler with various library functions to produce an executable image.
Semicolon
linker
&
function prototype
29. Forces the computer to display decimal point and trailing zeroes
showpoint
variable
Literals
recursive
30. Most calculations are normally performed by ______ statements.
vectors
function prototype
assignment
rand
31. The ________ of an identifier is the portion of the program in which the identifier can be used.
named constant
scope
definition
cin >> variable
32. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
void
type coercion
register
assignment statement
33. The _________ begins the body of every function and the _________ ends the body of every function.
&
floating-point
named constant
{ }
34. In inheritance the ____________ is the class that supplies the inherited members.
searching
base class
mixed expression
whitespace
35. 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
36. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
inline functions
comments
/n
break
37. The ________ qualifier is used to declare read-only variables.
const
void
getline
Preprocessor
38. Used to qualify hidden names so that they can be used.
scope resolution operator
fstream
floating-point
cmath
39. Creates a copy of a string.
char
scope
strcpy()
data type
40. The symbol for the binary scope resolution operator
::
fstream
/n
getline
41. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
assignment statement
token
cin
42. Member objects are constructed __________ their enclosing class object.
source file
before
linker
function scope
43. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
auto
friend
definition
searching
44. A ________ program executes before the compiler's translation phase begins.
two-dimensional
globals
preprocessor
fixed
45. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
getline
//
base class
comments
46. A program that finds and attaches to your program the indicated libraries for compilation
scope resolution operator
preprocessor
strcmp()
new line
47. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.
template
/n
this
static
48. Syntax for named constant declaration
recursive
const datatype identifier = value
switch
n
49. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
polymorphism
address
definition
50. A pointer is a variable that contains as its value the____________ of another variable.
cin
address
source file
cout