When the location of the original variable is passed as an
argument from the calling method to the called method, we say
that it is...
a. passed by reference
b. copy passed
c. passed by value
d. reference passed
e. none of the above - (correct answer) a. passed by
reference
How many times does the message box get executed in a loop
that begins with the following statement?
,int I;
for (I = 1; I < 4; I++)
{
MessageBox.Show(I);
}
a. 0
b. 2
c. 3
d. 1
e. none of the above - (correct answer) c. 3
What is the value of the variable I after the loop is finished
executing?
int I;
for (I = 1; I < 4; I++)
{
MessageBox.Show(I);
}
, a. 1
b. 2
c. 3
d. 4
e. none of the above - (correct answer) d. 4
How many locations will there be for an array declared as:
string[ ] Names = new string[4];
a. 4
b. 3
c. 2
d. 1
e. none of the above - (correct answer) a. 4
After the code is finished executing, what is the value of A[1]?
int[ ] A = new int[5];
int[ ] B = new int[3];
int x;
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 MEGAMINDS. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for £18.69. You're not tied to anything after your purchase.