1 - 5 C# final

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

The binary equivalent of 24 is ____.

00011000

In order to indicate a value is constant and cannot be changed, the keyword constant is added.

False

The Console class is defined in the System namespace.

True

The European Computer Manufacturers Association ratified C# and its CLI specifications into international standards.

True

The value 3.42e-4 is equivalent to _____.

.000342

double answer = Math.Pow(3, 2); The result of the call to Math.Pow( ) in the above statement is to store ________ in answer:

9

Which of the following would display "Good day!" on the screen?

Console.WriteLine("Good day!");

Which of the following statements would produce the output shown here? Live Life to the fullest

Console.WriteLine("Live\nLife to the \tfullest");

A machine that has a 64-bit processor can process 64 characters at one time.

False

A method call is the same as a method declaration.

False

A namespace is really nothing more than a group of statements placed together under a single name.

False

A semicolon is placed on the end of a method heading following the parameter list.

False

A standard convention used by C# programmers is to use Pascal case style for class, data member identifiers, and method identifiers.

False

A standard convention used by programmers for naming classes is to use an action verb phrase.

False

Base 16, also called the octal numbering system, uses powers of sixteen.

False

Both static and constant are keywords in C#.

False

C# is considered native code.

False

Ceiling( ), Pow( ), and Floor( ) are all static members of the Console class.

False

Classes and class diagrams are used most often with the structured procedural approach to software development.

False

Classes are actually implemented through types in C#.

False

Comments are considered instructions to the computer.

False

Console applications require a Main( ) method, unlike Windows applications that do not require a Main( ) method.

False

Constants are normally named using all lowercase characters, separating second and subsequent words with the underscore character.

False

Hexadecimal uses the symbols 1, 2, 3, 4, 5, 6, 7 8, 9, A, B, C, D, E, F ,G.

False

IDEs include a number of useful development tools such as SensitiveWindows, pop-up windows with completion options.

False

If a method does not return a value, the void keyword is placed inside the parentheses in the method heading.

False

Methods can be defined globally outside of a class in C#.

False

Semicolons are placed at the end of method headings.

False

Software consists of programs, which are sets of instructions telling you how to use the computer.

False

The accessibility modifier identifies what type of value is returned when the method is completed.

False

The assignment operators (=, +=, -=, *=, and /=) represent operations that appear at the top of the hierarchy in the order of operations.

False

The bool data type can take on values of true/false or on/off.

False

The decimal equivalent for 3.42e-5 in scientific notation is .00342.

False

The definition for a method includes just the heading. The signature includes the heading and the body of the method.

False

The entries found inside the parentheses of the method heading are called the access modifiers.

False

The first step in the program development process is design.

False

The following are examples of the access modifiers available in C#: public, personal, protected.

False

The iterative approach in the software development process indicates that the application will never be fully developed.

False

The name of the method, modifiers, return type, and the types of its formal parameters make up the signature of the method.

False

The value $78,888.90 is printed as output when the {0:c) format specifier is used in the following Write statement: Console.Write("{0:c}", 78888.894);

False

Unicode includes representation of 2 8 or 256 unique characters.

False

When you think about a machine that has 60 gigabytes of hard disk space, you can store 60 million characters.

False

moreData = true; An error will be produced when moreData is assigned the boolean variable shown above because the keyword true should be enclosed in double quotation marks.

False

The Hexadecimal numbering system uses all of the following symbols EXCEPT _____.

H

In Visual Studio .NET, the feature that attempts to sense what you are going to type before you type it is called ____ .

IntelliSense

Which of the following is a user-defined method?

Main()

____ is added to hold the screen when the program runs.

Read( )

Which method of the Console class allows multiple characters to be input via the keyboard?

ReadLine( )

The Math class has a number of static methods located in the _____________ namespace.

System

As far as the compiler is concerned, you could actually type the entire program without touching the Enter key.

True

Both out and ref parameter types cause a method to refer to the same variable that was passed into the method.

True

C# allows you to mix numeric integral types and floating-point types in an expression.

True

C# offers both call by value and call by reference parameters. Call by value is the default type.

True

During the first phase of software development, you should make sure you understand the problem definition.

True

Each instruction statement has a semantic meaning—a specific way in which it should be used.

True

In order to call a static method from another class, the class name must be used with the method name.

True

In order to hold the screen when the program runs, programmers often add Console.Read( ) as a last statement.

True

Methods that use the static modifier are called class methods.

True

Prototypes range from being elaborate designs created with graphics, word processing, or paint programs, to being quite cryptic sketches created with paper and pencil.

True

The Framework Class Library (FCL) consists of more than 2,000 classes.

True

The Read( ) method is different from the ReadLine( ) method in that the Read( ) returns an int and the ReadLine( ) returns a string argument.

True

The Visual Studio IDE is an interactive environment that enables you to type the source code, compile, and execute without leaving the IDE program.

True

The base-2 number system is also called the binary number system.

True

The binary value for ten is 00001010.

True

The result of "123" + "321" is "123321".

True

float totalAmount = 23.57; The float compile-time initialization above will produce an error because it is missing the type specifier (f or F).

True

WriteLine( ) differs from Write( ) in that ____ .

WriteLine( ) advances to the next line after it finishes displaying output

In order to test a class, ____.

all of the above

Which of the following is a valid compile-time initialization for amountDue, a variable of the decimal type, that will initially be set to zero?

amountDue = 0m;

Which of the following would be the most appropriate identifier for a memory location that will store the amount of rainfall for a given period of time?

amountOfRain

Which statement subtracts 100 from the original value of an answer?

answer -= 100;

Probably the most important rule for naming identifiers is ____.

be descriptive and select a meaningful name

A(n)____ version of software has not been fully tested and may still contain bugs or errors.

beta

If you expect to receive an "A" in this course, which of the following declarations would be most appropriate for storing the grade?

char letterGrade;

The diagram used in object-oriented development to show the characteristics and behaviors of a class is a(n) ____.

class diagram

Console is a ____ and WriteLine( ) is a ____.

class, method

Following standard conventions used by many programmers, the identifier REBATE would be defined as a(n) ____.

constant

Which of the following is a valid identifier?

finalGrade

Console.WriteLine("Final Grade = {0:N2}", CalculateGrade(90, 75, 83)); The {0:N2} above indicates the ____.

first argument should display two digits to the right of the decimal

When a distinction is made between parameters and arguments, ____.

formal parameters appear in the method heading

The first line of a method is called the ____ of the method.

heading

The definition of the method ____.

includes the heading and the body

Comments that use two forward slashes are called ____ .

inline

If you write a program and, instead of multiplying two values together as intended, you divide one value by the other, you produce a(n) ____ error.

logic

In order to call or invoke a nonvalue-returning method, enter the ____.

method's identifier followed by list of arguments

A method that does not return any value on exit, ____.

must be defined to have a void return type

When you assign a default value to a parameter, it then becomes a(n): ____.

optional parameter

A quick way to identify a method is by looking for ____ .

parentheses

Class methods manipulate data by ____.

passing information as arguments through parameters.

public static void Main( ) The access modifier in the heading above is the keyword ____.

public

The ____ parameter type cannot be used unless the original argument is initialized before it is sent to the method.

ref

The ____ specifies what kind of information is returned when the body of the method is finished executing.

returnType

Calls to ____ methods use the class identifier instead of the object identifier as the method qualifier.

static

The following members of the Math class, (Round( ), Max( ), Exp( )), must be called using the class name, because they are all ____.

static methods

One convention used for naming identifiers is called Pascal case. This convention requires that ____.

the first letter be uppercase with the first letter of each subsequent word capitalized

Run-time errors are more difficult to find than syntax errors because ____ .

the program may compile and produce results with a run-time error

Methods are the members of a class that perform an action, and through writing methods you describe the behavior of data.

true

Which of the following integral type can NOT be used to store negative values?

uint

Method names should be defined with meaningful names using ____.

verb phrases

An advantage of using named parameters is: ____.

you can send in values through using the names of the parameters instead of having to worry about getting the exact order


Kaugnay na mga set ng pag-aaral

4. Anti-Inflammatory Drugs: Steroids

View Set

How to Read Literature Like a Professor Ch 14-26

View Set