Exam 6: Modularizing Your Code with Methods

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

When using the debugger, which command lets you immediately execute all remaining statements inside the current method, and return to the method's caller?

(Multiple Choice)
4.9/5
(32)

In general terms, a program that is broken into smaller units of code such as methods, is known as a____________.

(Multiple Choice)
4.7/5
(42)

When the keyword void appears in the method header, it means the method will return a value.

(True/False)
4.8/5
(37)

You can pass string literals as arguments to methods containing string parameters.

(True/False)
4.8/5
(39)

____________ are useful for returning more than one value from a method.

(Multiple Choice)
4.9/5
(40)

In C#, you declare an output parameter by writing the ____________ keyword before the parameter variable's data type.

(Multiple Choice)
4.8/5
(29)

In a method header, the name is always followed by a set of parentheses.

(True/False)
4.8/5
(34)

When a method is declared with the private access modifier, it can be called only by code inside the same class as the method.

(True/False)
4.8/5
(35)

The debugger's Step Into command lets you view all statements inside a method being called by the current program statement

(True/False)
4.7/5
(41)

Which of the following data types can be returned from a method?

(Multiple Choice)
4.8/5
(35)

You can use a(n) ____________ to test a conditional expression and return either

(Multiple Choice)
4.8/5
(41)

When you pass an argument to a ref parameter, that argument must already be set to some value.

(True/False)
4.8/5
(29)

A method containing a(n) ____________ allows you to specify which parameter variable the argument should be passed to.

(Multiple Choice)
4.8/5
(29)

When using the debugger, which command lets you follow a method call into the statements in the method's source code?

(Multiple Choice)
4.9/5
(36)

Which one of the following statements correctly calls a method named ShowName?

(Multiple Choice)
4.8/5
(31)

When you call a method that has an output parameter, you do not need to assign an initial value to the argument variable.

(True/False)
4.9/5
(34)

Default arguments must be literals or constants.

(True/False)
4.8/5
(30)

If you provide a default argument for the first parameter in a list, you do not need to provide default arguments for the remaining parameters.

(True/False)
4.8/5
(42)

A __________ is a variable that receives an argument that is passed into a method.

(Multiple Choice)
4.9/5
(41)

You have to write the data type for each parameter variable in a parameter list.

(True/False)
4.8/5
(36)
Showing 21 - 40 of 69
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)