COSC 1436 EXAM 3 UPDATED ACTUAL Questions and CORRECT Answers
3 views 0 purchase
Course
COSC 1436
Institution
COSC 1436
COSC 1436 EXAM 3 UPDATED ACTUAL
Questions and CORRECT Answers
Here is the header for a function named computeValue:
Which of the following is a valid call to the function? - CORRECT ANSWER-
computeValue(10);
This function causes a program to terminate, regardless of which function or control ...
COSC 1436 EXAM 3 UPDATED ACTUAL
Questions and CORRECT Answers
Here is the header for a function named computeValue:
Which of the following is a valid call to the function? - CORRECT ANSWER✔✔-
computeValue(10);
This function causes a program to terminate, regardless of which function or control
mechanism is executing. - CORRECT ANSWER✔✔- exit()
An array's size declarator must be a ________ with a value greater than ________. -
CORRECT ANSWER✔✔- Constant integer expression with a value greater than 0
A two-dimensional array of characters can contain ________. - CORRECT ANSWER✔✔-
all of these
Which of the following is a valid C++ array definition? - CORRECT ANSWER✔✔- int
array[10];
The range-based for loop, in C++ 11, is designed to work with a built-in variable known as
the ________. - CORRECT ANSWER✔✔- range variable
A ________ argument is passed to a parameter when the actual argument is left out of the
function call. - CORRECT ANSWER✔✔- default
Arrays may be ________ at the time they are ________. - CORRECT ANSWER✔✔-
Initialized at the time they are declared
Which statement correctly defines a vector object for holding integers? - CORRECT
ANSWER✔✔- vector<int>v;
Which line in the following program contains the header for the showDub function?
The statement:
int grades[ ] = { 100, 90, 99, 80};
shows an example of: - CORRECT ANSWER✔✔- implicit array sizing
True/False: You may use the exit() function to terminate a program, regardless of which
control mechanism is executing. - CORRECT ANSWER✔✔- True
True/False: If an array is partially initialized, the uninitialized elements will be set to zero. -
CORRECT ANSWER✔✔- True
True/False: In the average case, an item is just as likely to be found near the beginning of an
array as near the end. - CORRECT ANSWER✔✔- True
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller MGRADES. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $10.49. You're not tied to anything after your purchase.