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. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
% modulus
const
//
srand
2. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
named constant
#include directive
stack
3. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
static
binary operator
object-oriented analysis and design (OOAD)
4. Characters used to separate symbols or reserved words or identifiers and statements
globals
public
operand value
whitespace
5. This manipulator causes the field to be left-justified with padding spaces printed to the right.
if...else
virtual functions
left
getline
6. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
classes
subscript (or index)
private
floating-point
7. Names of things that are used in a program - can apply to variables & constants and functions
{ }
.cpp
comments
identifiers
8. Grammar rules of the language; compiler will try to identify and locate syntax errors
static_cast<char>(65)
data type
syntax
operand value
9. A __________ data member represents class-wide information.
operand value
selection
static
void
10. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
unary operator
allocating memory
selection
rand
11. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
int values
t
classes
beginning
12. In inheritance the ____________ is the class the receives the inherited members.
floating-point
scope resolution operator
Preprocessor
derived class
13. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
Arithmetic Operators
stack
prompt
14. The ________ enables access to a global variable with the same name as a variable in the current scope.
const
rand
Unified Modeling Language(UML)
unary scope resolution operator (::)
15. Compares two strings and returns 0 if they are equal.
strcmp()
heap
floating-point
prompt
16. Type casting syntax
beginning
static_cast<char>(65)
selection
getline
17. int namespace include using return examples of ___________
continue
classes
reserve words
preprocessor
18. tab
t
before
overloading
#include <headerfilename>
19. data types that refer to numbers with decimals
heap
constant variable
floating-point
local variable
20. The _____ causes the contents of another file to be inserted into a program.
operand value
virtual functions
default constructor
#include directive
21. You can declare default values for a function in the ____________________.
variables
static
function parameters
unary operator
22. Sets floating-point values to a fixed decimal format
fixed
Closing brace
switch
definition
23. The ________ of an identifier is the portion of the program in which the identifier can be used.
?
address
scope
pointer
24. An expression in which all operands have the same data type - result will have the same data type as operands
non-static
like-type expression
classes
semicolon
25. 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.
floating-point
continue
const
semicolon
26. This manipulator is used to establish a field width for the value immediately following it.
setw
static
{ }
int values
27. Default name of executable file
assignment
a.out
before
loader
28. The address-of operator. it is used to assign pointers and to print the address of variables.
&
definition
fixed
if
29. An operator that can only be used with int values. result will always be an int.
scope
Arithmetic Operators
% modulus
syntax
30. Every C++ program begins execution at the function _________.
srand
#include directive
void
main
31. The ________ program transfers the executable image of a C++ program from disk to memory.
::
function prototype
loader
reserve words
32. * / % + -
new line
access specifier
Arithmetic Operators
operator overloading
33. Every C++ statement ends with a(n) _________.
allocating memory
#include
semicolon
classes
34. In inheritance the ____________ is the class that supplies the inherited members.
n
cin >> variable
base class
Counter-controlled or definite
35. Nonexecutable statements that are included in a program to provide information about what the program does etc.
like-type expression
default constructor
arithmetic expression
comments
36. A function that can be used to read character data including whitespace
cin.get(ch)
integer operands
member
type
37. These are data items whose values do not change while the program is running
Literals
NULL
operator
strcpy()
38. A file must be ________ before data can be written to or read from it.
setw
opened
continue
Sentinel
39. The process of determining if an array contains a particular key value is called _________ the array.
searching
address
global
function parameters
40. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
operand value
friend
base
variable
41. The sign you use for pointers
t
*
unary scope resolution operator (::)
type
42. A memory location with a name and data type - its content may be changed during program execution
setw
a.out
preprocessor
variable
43. The stream extraction operator
const
stack
preprocessor
>>
44. The process of placing the elements of an array in order is called ________ the array.
sorting
global
reserved words
char
45. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
subscript (or index)
binary operator
named constant
#include
46. The number used to refer to a particular element of an array is called its ________.
/n
Semicolon
subscript (or index)
fixed
47. Forces the computer to display decimal point and trailing zeroes
template
const datatype identifier = value
showpoint
global
48. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
strlen()
strcmp()
pointer
Semicolon
49. When a value of one data type is implicitly (automatically) changed to another data type
subscript (or index)
type coercion
mixed expression
cin >> variable
50. A program that finds and attaches to your program the indicated libraries for compilation
preprocessor
scope
new line
opened