Exam 2: Using Data

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

What are the differences between the prefix increment operator and postfix increment operator?

Free
(Essay)
4.9/5
(27)
Correct Answer:
Verified

When you only want to increase a variable's value by 1, there is no apparent difference between using the prefix and postfix increment operators. However, these operators function differently. When you use the prefix ++, the result is calculated and stored, and then the variable is used. In contrast, when you use the postfix ++, the variable is used, and then the result is calculated and stored.

In the C# statement moneyString = someMoney.ToString("F3") , the expression F3 is an example of a(n) ____.

Free
(Multiple Choice)
4.8/5
(39)
Correct Answer:
Verified

B

The keyword ____ is used to declare a named constant.

Free
(Multiple Choice)
4.9/5
(46)
Correct Answer:
Verified

C

In arithmetic operations with operands of dissimilar types, a(n) ____ is the automatic conversion of nonconforming operands to a unifying type.

(Multiple Choice)
4.8/5
(38)

As an alternative to the Convert class methods, you can use a(n) ____  method to convert a string to a number.

(Multiple Choice)
4.7/5
(32)

You can use the ____ method to accept user input from the keyboard.

(Multiple Choice)
4.9/5
(36)

A prefix or postfix ____ operator reduces a variable's value by 1.

(Multiple Choice)
4.7/5
(39)

How is a named constant different from a variable? How would you create a named constant (and show an example)?

(Essay)
4.8/5
(37)

+= is the C# ____ operator; it adds the operand on the right to the operand on the left and assigns it to the operand on the left in one step.

(Multiple Choice)
4.8/5
(43)

What is a variable declaration, what is its purpose, and what does the declaration include?

(Essay)
4.8/5
(29)

someValue++ is an example of the use of the prefix increment operator.

(True/False)
4.9/5
(38)

A program that accepts console input from the user is a(n) ____ program.

(Multiple Choice)
4.8/5
(35)

A(n) ____ arithmetic operator has one argument to the left and another argument to the right of the operator.

(Multiple Choice)
4.8/5
(35)

The equal sign ( = ) is the C# assignment operator.

(True/False)
4.7/5
(33)

Explain why implicit numeric conversions are necessary and how C# chooses operands to convert.

(Essay)
4.9/5
(31)

The number of significant digits in a floating point number specifies the mathematical accuracy of the value. A(n) ____________________ data type can hold up to 16 significant digits of accuracy.

(Short Answer)
4.8/5
(48)

You declare a Boolean variable by using type ____.

(Multiple Choice)
4.8/5
(34)

A ____ is a string of characters that optionally contains fixed text and contains one or more format items or placeholders for variable values.

(Multiple Choice)
4.9/5
(42)

How can you compare strings using the Compare() method?

(Essay)
4.8/5
(38)

The ____ method from the Convert class converts a specified value to an 8-bit unsigned integer.

(Multiple Choice)
4.9/5
(33)
Showing 1 - 20 of 42
close modal

Filters

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