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. 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.
whitespace
continue
cin >> variable
Semicolon
2. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
auto
.cpp
inline functions
selection
3. Used for dynamically allocated variables
const datatype identifier = value
base class
mixed expression
heap
4. A filestream variable that represents the default output device
cout
rand
Arithmetic Operators
const
5. Used to qualify hidden names so that they can be used.
*
scope resolution operator
getline
template
6. The sign you use for references
*
access specifier
operator
&
7. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
&
Arithmetic Operators
if...else
private
8. Type casting syntax
register
*
static_cast<char>(65)
function prototype
9. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
type casting (conversion)
prompt
break
rand
10. A constant object must be __________; it cannot be modified after it is created.
Counter-controlled or definite
t
register
initialized
11. Forces the computer to display decimal point and trailing zeroes
showpoint
getline
cmath
preprocessor
12. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
editor
#include
Preprocessor
13. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
/n
named constant
Default memberwise assignment
constant variable
14. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
binary operator
Sentinel
cmath
15. A variable that holds the address of another variable.
strcpy()
recursive
pointer
strlen()
16. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
function prototype
floating-point
//
Literals
17. Function ________ is used to produce random numbers.
rand
associations
preprocessor
floating-point
18. Symbol that denotes an action to be performed
Unified Modeling Language(UML)
pointer
Semicolon
operator
19. Message displayed to the screen asking user for input; generated with an output statement
Semicolon
beginning
stack
prompt
20. Use 2 characters to represent one
new line
preprocessor
initialized
escape sequences
21. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
vectors
selection
Semicolon
local variable
22. A memory location with a name and data type - its content may be changed during program execution
variable
const
selection
editor
23. Whole numbers - no decimals and no commas included
*
opened
classes
int values
24. Preprocessor directive syntax
#include <headerfilename>
before
auto
this
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.
getline
Arithmetic Operators
/n
information hiding
26. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
virtual functions
special symbols
delete
Unified Modeling Language(UML)
27. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
operator
function prototype
stack
constant variable
28. You must have a ___________ for every variable you intend to use in a program
definition
unary operator
cout
classes
29. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
associations
unary operator
int values
30. A member function should be declared static if it does not access __________ class members.
heap
switch
non-static
Literals
31. A function that calls itself
recursive function
pointer
getline
arithmetic expression
32. The number used to refer to a particular element of an array is called its ________.
cout
subscript (or index)
loader
?
33. The storage-class specifiers are mutable - auto - ________ - extern and static.
?
rand
Semicolon
register
34. Header file that contains commonly performed mathematical functions
cmath
function scope
static
//
35. Compares two strings and returns 0 if they are equal.
switch
if
subscript (or index)
strcmp()
36. A human readable file that contains C++ program
source file
strcmp()
Stack overflow
auto
37. A variable declared outside any block or function is a ________ variable.
global
srand
function scope
two-dimensional
38. This is used to mark the end of a complete C++ programming statement.
derived class
Semicolon
dot (.)
like-type expression
39. Used for function calls and local variables
base class
dot (.)
/n
stack
40. Every C++ program begins execution at the function _________.
main
allocating memory
NULL
token
41. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
inheritance
heap
token
return
42. Words that are used for special purposes in a program
friend
reserved words
const
Stack overflow
43. The modulus operator (%) can be used only with __________.
auto
derived class
allocating memory
integer operands
44. Names of things that are used in a program - can apply to variables & constants and functions
fixed
register
local variable
identifiers
45. A file must be ________ before data can be written to or read from it.
Default memberwise assignment
opened
named constant
default constructor
46. Program components in C++ are called functions and ________.
classes
special symbols
ofstream
data type
47. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
#include <headerfilename>
::
void
48. In inheritance the ____________ is the class the receives the inherited members.
constant variable
named constant
derived class
return
49. A type of pointer that can point at objects of any data type.
object-oriented analysis and design (OOAD)
address
void pointer
non-static
50. Naming convention for C++ programs
loader
information hiding
#include <headerfilename>
.cpp