13 CS c sharp

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

When you pass an argument to a method, the argument's data type must be ____________ with the receiving parameter's data type. Select one: a. identical to b. data bound c. user friendly d. assignment compatible

D

When you want a method to be able to change the value of a variable that is passed to it as an argument, the variable must be ____________. Select one: a. passed by value b. a variable parameter c. a value parameter d. passed by reference

D

When an argument is ____________, only a copy of the argument's value is passed into the parameter variable. Select one: a. passed by reference b. uninitalized c. named d. passed by value

D

When using the debugger, which command lets you execute a method call without seeing the individual statements within the method? Select one: a. step into b. step out c. step execute d. step over

D

A value-returning statement must have a(n) ____________ statement. Select one: a. return b. void c. assignment d. logical

A

It is a standard convention among C# programmers to use ____________ for method names because it differentiates method names from variable and field names. Select one: a. Pascal Case b. lowercase characters c. uppercase character d. camelCase

A

The ____________ is a collection of statements that are performed when a method is executed. Select one: a. method body b. executable code c. method header d. method code listing

A

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. Select one: a. code reuse b. logic recycle c. software engineering d. code recycling

A

You can use a(n) ____________ to test a conditional expression and return either true or false. Select one: a. Boolean method b. void method c. reference parameter d. if-else statement

A

____________ are useful for returning more than one value from a method. Select one: a. Reference parameters b. Named arguments c. Default arguments d. Parameter list

A

When you call a ____________ method, it executes its code and returns without passing any value back to the program statement that called it. Select one: a. private b. value-returning c. void d. terminal

C

When you call a ____________ method, it executes statements it contains and then returns a value back to the program statement that called it. Select one: a. void b. recursive c. value-returning d. public

C

Which of the following data types can be returned from a method? Select one: a. string b. int c. any of these d. bool

C

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. Select one: a. parameter list b. output parameter c. named constant d. named argument

B

In C#, you declare an output parameter by writing the ____________ keyword before the parameter variable's data type. Select one: a. const b. out c. ref d. public

B

In a value-returning method, the type of data the method returns is commonly called the method's ____________. Select one: a. method type b. return value c. named type d. assigned value

B

When a ____________ finishes, it returns a value to the statement that called it. Select one: a. public method b. value-returning method c. void method d. private method

B

Which of the following is the best type of tool for breaking up input validation into separate steps? Select one: a. void method b. Boolean method c. nested if statement d. none of these

B

Which one of the following statements correctly calls a method named ShowName? Select one: a. ShowName; b. private void ShowName() c. ShowName(); d. Call,ShowName();

C

A method containing a(n) ____________ allows you to specify which parameter variable the argument should be passed to. Select one: a. named constant b. dynamic parameter c. named argument d. alternative argument

C

A parameter variable's scope is the ____________ in which the parameter variable is declared. Select one: a. namespace b. field c. method d. class

C

Data values passed a method when it is called are known as ____________. Select one: a. parameters b. reference c. arguments d. variables

C

In general terms, a program that is broken into smaller units of code such as methods, is known as a____________. Select one: a. tiered project solution b. divisional program c. modularized program d. method-based solution

C

A __________ is a variable that receives an argument that is passed into a method. Select one: a. reference b. arguments c. none of these d. parameter

D

Dividing a large problem into several smaller problems that are easily solved is sometimes called ____________. Select one: a. top down design b. programmatic simplification c. parallel design d. divide and conqure

D

In C#, you declare a reference parameter by writing the ____________ keyword before the parameter variable's data type. Select one: a. private b. out c. const d. ref

D

Programmers commonly use a technique known as ____________ to divide an algorithm into smaller parts, which are then implemented as methods. Select one: a. modular prototyping b. flowcharting c. subtask recognization d. top-down design

D

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. Select one: a. method specification b. method description c. method body d. method header

D

The memory address that is saved by the system when a method is called and is the location to which the system should return after a method ends is known as the ____________. Select one: a. jump position b. virtual break c. method address d. return point

D

When a ____________ is provided for a parameter, it is possible to call the method without explicitly passing an argument into the parameter. Select one: a. Boolean value b. bitwise operator c. named argument d. default argument

D

When a method contains multiple parameters, they are often referred to collectively as a(n) ____________. Select one: a. argument list b. reference list c. reference set d. parameter list

D

A mathematical expression such as A * B cannot be passed as an argument to a method containing a value parameter. Select one: True False

False

Every method must have a nonempty parameter list. Select one: True False

False

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. Select one: True False

False

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. Select one: True False

False

In a general sense, a class is a collection of statements that performs a specific task Select one: True False

False

Nested if statements can be useful for modularizing input validation. Select one: True False

False

Passing an argument by reference guarantees that the argument will not be changed by the method it is passed into. Select one: True False

False

Suppose you're using the debugger to step through a method, and you want to immediately return to the place in the program where the method was called. The Step Return command will accomplish this Select one: True False

False

When the keyword void appears in the method header, it means the method will return a value. Select one: True False

False

void methods are useful for simplifying complex conditions that are tested in decision and repetition structures. Select one: True False

False

A mathematical expression such as A * B cannot be passed as an argument to a method containing a reference parameter. Select one: True False

True

A method definition has two parts: a header and a body. Select one: True False

True

A method that has an output parameter must set the output parameter to some value before it finishes executing. Select one: True False

True

If a specific task is performed in several places in a program, a method can be written once to perform that task and then be executed any time it is needed. Select one: True False

True

In a method header, the name is always followed by a set of parentheses. Select one: True False

True

Methods usually belong to a class, so you must write a method's definition inside the class to which it is supposed to belong. Select one: True False

True

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

True

When you call a method that has a reference parameter, you must also write the keyword ref before the argument. Select one: True False

True

You can pass int arguments into int parameters, but you cannot pass double or decimal arguments into int parameters. Select one: True False

True


संबंधित स्टडी सेट्स

Promulgated Contract - End of Section Questions

View Set

Psych 135 Social Psychology- Parkinson UCLA

View Set

Research Problems & Literature Reviews

View Set

Life Insurance Policy Provisions, Riders, and Options

View Set