Exam 6: Modularizing Your Code with Methods
Exam 1: Introduction to Computers and Programming161 Questions
Exam 2: Introduction to Visual C#131 Questions
Exam 3: Processing Data176 Questions
Exam 4: Making Decisions78 Questions
Exam 5: Loops, Files, and Random Numbers112 Questions
Exam 6: Modularizing Your Code with Methods69 Questions
Exam 7: Arrays and Lists99 Questions
Exam 8: More About Processing Data90 Questions
Exam 9: Classes and Multiform Projects89 Questions
Exam 10: Inheritance and Polymorphism37 Questions
Exam 11: Databases69 Questions
Select questions type
When you call a ____________ method, it executes its code and returns without passing any value back to the program statement that called it.
Free
(Multiple Choice)
5.0/5
(46)
Correct Answer:
A
In C#, you declare a reference parameter by writing the ____________ keyword before the parameter variable's data type.
Free
(Multiple Choice)
4.9/5
(33)
Correct Answer:
B
Passing an argument by reference guarantees that the argument will not be changed by the method it is passed into.
Free
(True/False)
4.7/5
(43)
Correct Answer:
False
A(n) ____________ works like a reference parameter, but the argument does not have to be set to a value before it is passed into the parameter.
(Multiple Choice)
4.8/5
(38)
Suppose you set a breakpoint inside a method named X. When you reach a statement that calls method X, the Step Over command will stop at the breakpoint.
(True/False)
4.8/5
(36)
In a value-returning method, the type of data the method returns is commonly called the method's ____________.
(Multiple Choice)
4.8/5
(35)
When you call a method that has a reference parameter, you must also write the keyword ref before the argument.
(True/False)
4.7/5
(41)
A parameter variable can be accessed by any statement outside the method in which the parameter variable is declared.
(True/False)
4.9/5
(45)
When calling a method and passing a variable as an argument, always write the data type and the variable name of the argument variable in the method call.
(True/False)
4.8/5
(35)
The ____________, which appears at the beginning of a method definition, lists several important things about the method, including the method's name and list of parameters.
(Multiple Choice)
4.9/5
(39)
When a method contains multiple parameters, they are often referred to collectively as a(n) ____________.
(Multiple Choice)
4.8/5
(40)
Programmers commonly use a technique known as ____________ to divide an algorithm into smaller parts, which are then implemented as methods.
(Multiple Choice)
4.7/5
(37)
A parameter variable's scope is the ____________ in which the parameter variable is declared.
(Multiple Choice)
4.8/5
(39)
The benefit from dividing code into methods known as ____________ is gained as follows: After you write code to perform a task once, you can use the code again every time your program needs to perform the same task.
(Multiple Choice)
4.7/5
(42)
Data values passed a method when it is called are known as ____________.
(Multiple Choice)
4.8/5
(40)
The debugger's Step Over command lets you view all statements inside a method being called by the current program statement.
(True/False)
4.9/5
(34)
If you are writing a method and you want it to receive arguments when it is called, you must equip the method with one or more access modifiers.
(True/False)
4.8/5
(33)
When a method is called, the program branches to that method and executes the statements in its body.
(True/False)
4.9/5
(42)
You can pass int arguments into int parameters, but you cannot pass double or decimal arguments into int parameters.
(True/False)
4.7/5
(41)
Showing 1 - 20 of 69
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)