In an IF...ELSE IF...ELSE IF structure, each statement whose expressions evaluate to true will
run their block of code - ANS-False
Only WHILE loops can be nested - ANS-False
Methods can be called from non-MAIN methods - ANS-True
The bottom of the runtime stack is the currently running method - ANS-False
cout-- is equivalent to count = count + 1 - ANS-False
Methods can access and modify other methods' local variables easily - ANS-False
Keywords can be used as variable identifiers/names - ANS-False
Every program needs a MAIN function or method to run - ANS-True
A DEFAULT CASE is required as part of a SWITCH statement - ANS-False
The main difference between a DO...WHILE and a WHILE loop is that a WHILE loop cannot
result in an infinite loop - ANS-False
The execution of one pass of a loop os referred to as a(n): - ANS-iteration
Creating multiple methods with the same name but different parameters (number of parameters
and/or data types) is called: - ANS-overloading
How many times will method1() be called with the following code?
FOR (CREATE i=7, i < 10, i++)
{
method1();
} - ANS-7
Which of the following does not have any effect in method overloading? - ANS-Return Type
Arrays are homogeneous, which means: - ANS-They can only contain one type of data
Which of the following is an advantage of creating and using methods in programs? - ANS-Allow
reuse of code
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 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 Hkane. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for £6.35. You're not tied to anything after your purchase.