Exam 8: More About Processing Data

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

Look at the following code sample: struct Pet { Public string name; Public int age; Public string type; } List<Pet> birdList = new List<Pet>(); Pet parrot = new Pet(); Which one of the following statements adds the Pet structure named parrot to the List object named birdList?

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

A

When you create a structure object with a simple declaration, the object's fields are initialized to their default values.

Free
(True/False)
4.9/5
(88)
Correct Answer:
Verified

False

If you pass an uppercase letter to the char.ToLower method, the character it returns will be unchanged.

Free
(True/False)
4.9/5
(88)
Correct Answer:
Verified

False

The ____________ can be used to retrieve a specific set of characters from a string.

(Multiple Choice)
4.8/5
(81)

Which one of the following character testing methods would you use to determine if a character is a number in the range 0 through 9?

(Multiple Choice)
4.7/5
(72)

You can use a subscript expression such as name[3]='A' to change the value of a character within a string.

(True/False)
4.9/5
(74)

Which one of the character testing methods would you use to determine that a string contains only letters and numbers?

(Multiple Choice)
4.8/5
(81)

The ____________ data type is used to store individual characters.

(Multiple Choice)
4.8/5
(81)

You can assign an enumerator directly to an int variable.

(True/False)
4.8/5
(88)

The fields contained in structure must all be of the same data type.

(True/False)
4.9/5
(81)

Once you have created an instance of a structure, you can access its fields using the dot operator (a period).

(True/False)
4.9/5
(93)

If you find yourself using a structure for more than simply encapsulating a set of variables into a single item, you should probably use a class.

(True/False)
4.9/5
(63)

Unlike other types of objects, you cannot pass a structure object as an argument to a method.

(True/False)
4.8/5
(85)

When integer values are assigned to the enumerators in an enumerated type, then each value must be unique.

(True/False)
4.7/5
(72)

Assuming that cat1 and cat2 are both instances of the Pet structure, which one of the following statements copies cat1 to cat2?

(Multiple Choice)
4.8/5
(80)

A string within a string is called a(n) ____________.

(Multiple Choice)
4.9/5
(82)

C# allows you to access the individual characters in a string using ____________.

(Multiple Choice)
4.7/5
(86)

String subscripts must be at least 0, and they must be less than the length of the string.

(True/False)
4.8/5
(65)

The char data type provides a single method that determines whether a character is a letter or number.

(True/False)
4.8/5
(76)

The ____________ method returns true if the string object starts with the substring, or false otherwise.

(Multiple Choice)
4.8/5
(96)
Showing 1 - 20 of 90
close modal

Filters

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