C++ Review Questions fill in the blank. Please answer all to the best of your ab
ID: 3829935 • Letter: C
Question
C++ Review Questions fill in the blank. Please answer all to the best of your ability! Thank you!
1.) This allows you to access structure members.
2.) This member function can be used to store binary data to a file.
3.) What is the last legal subscript that can be used with the following array?
int values[5];
4.) Regardless of the algorithm being used, a search through an array is always
performed ________.
5.) The contents of pointer variables may be changed with mathematical statements that
perform ________.
6.) In order, the three-step process of using a file in a C++ program involves:
7.) The name of the structure is referred to as its ________.
8.) What does the following statement do?
vector<int> v(10);
9.) To help prevent memory leaks from occurring in C++ 11, a ________ automatically
deletes a chunk of dynamically allocated memory when the memory is no longer
being used.
10.) Look at the following statement:
sum += *array++;
This statement ________.
Explanation / Answer
1.) member access operator (. dot) allows you to access structure members.
2.) This write() member function of ofstream object can be used to store binary data to a file.
3.) What is the last legal subscript that can be used with the following array?
int values[5];
Ans: 4
4.) Regardless of the algorithm being used, a search through an array is always
performed using subscript.
5.) The contents of pointer variables may be changed with mathematical statements that
perform addition and subtraction.
6.) In order, the three-step process of using a file in a C++ program involves:
Open the existing file, read/write data, close the file
7.) The name of the structure is referred to as its tag
8.) What does the following statement do?
vector<int> v(10);
decalring a vector variable v of size 10
9.) To help prevent memory leaks from occurring in C++ 11, a smart pointer automatically
deletes a chunk of dynamically allocated memory when the memory is no longer
being used.
10.) Look at the following statement:
sum += *array++;
This statement assigns the dereferenced pointer's value, then increments the pointer's address
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.