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. All C++ Variables are_________.
t
getline
prompt
case sensitive
2. Function ________ is used to set the random number seed to randomize a program.
whitespace
function prototype
classes
srand
3. Default name of executable file
a.out
register
cin
ofstream
4. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
Arithmetic Operators
#include
fixed
<<
5. A file must be ________ before data can be written to or read from it.
static
void
opened
srand
6. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
unary scope resolution operator (::)
function scope
member
continue
7. Keyword public is a(n) _________
type coercion
escape sequences
const datatype identifier = value
access specifier
8. Syntax for named constant declaration
void
allocating memory
semicolon
const datatype identifier = value
9. This manipulator causes the field to be left-justified with padding spaces printed to the right.
NULL
static
{ }
left
10. A function is invoked with a ________.
Literals
stack
strcpy()
function call
11. Grammar rules of the language; compiler will try to identify and locate syntax errors
return
syntax
Counter-controlled or definite
/n
12. Used for dynamically allocated variables
prompt
heap
default constructor
NULL
13. Allows the programmer to store a value in a variable
variables
token
assignment statement
switch
14. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
linker
pointer
cout
return
15. The symbol for the binary scope resolution operator
comments
::
vectors
unary scope resolution operator (::)
16. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
if...else
floating-point
static
fixed
17. The process of determining if an array contains a particular key value is called _________ the array.
searching
whitespace
polymorphism
private
18. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
//
initialized
int values
19. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
a.out
scope
overloading
20. Function ________ is used to produce random numbers.
template
reserve words
rand
like-type expression
21. * / % + -
function prototype
preprocessor
Arithmetic Operators
loader
22. Member objects are constructed __________ their enclosing class object.
whitespace
main
before
semicolon
23. Message displayed to the screen asking user for input; generated with an output statement
prompt
Unified Modeling Language(UML)
variables
strcmp()
24. All ______ must be declared before they are used.
register
variables
Arithmetic Operators
integer operands
25. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
inline functions
type casting (conversion)
pointer
subscript (or index)
26. The sign you use for pointers
function parameters
attributes
Closing brace
*
27. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
prompt
strcmp()
subscript (or index)
28. Forces the computer to display decimal point and trailing zeroes
preprocessor
assignment
showpoint
object-oriented analysis and design (OOAD)
29. 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.
vectors
continue
inheritance
strlen()
30. A filestream variable that represents the default output device
cout
non-static
friend
Semicolon
31. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
default constructor
main
associations
switch
32. The process of placing the elements of an array in order is called ________ the array.
if
associations
global
sorting
33. tab
getline
% modulus
t
a.out
34. This is used to mark the end of a complete C++ programming statement.
*
identifiers
Semicolon
syntax
35. The number used to refer to a particular element of an array is called its ________.
inheritance
int values
variable
subscript (or index)
36. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call
base
cin
void pointer
binary operator
37. A program that finds and attaches to your program the indicated libraries for compilation
preprocessor
Semicolon
semantics
linker
38. The size & shape & color and weight of an object are considered
attributes
floating-point
return
derived class
39. Compares two strings and returns 0 if they are equal.
setw
semantics
strcmp()
recursive function
40. Identifier or expression that is part of the calculation to be performed
operand value
non-static
Default memberwise assignment
ofstream
41. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
cin.get(ch)
attributes
Semicolon
42. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
heap
friend
assignment statement
43. A pointer is a variable that contains as its value the____________ of another variable.
opened
default constructor
address
subscript (or index)
44. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
Unified Modeling Language(UML)
Arithmetic Operators
base class
private
45. Most calculations are normally performed by ______ statements.
object-oriented analysis and design (OOAD)
assignment
.cpp
beginning
46. Operator with only one operand
unary operator
static
recursive function
#include <headerfilename>
47. The ________ program combines the output of the compiler with various library functions to produce an executable image.
delete
const datatype identifier = value
linker
initialized
48. Program components in C++ are called functions and ________.
classes
base class
loader
rand
49. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
derived class
like-type expression
return
50. 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.
like-type expression
inheritance
?
case sensitive