Intro to C sharp Chapter 7-9 true or false

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

You cannot store a string in a variable of the char data type.

FALSE; Because char variables can hold only one character

Enumerators must be enclosed in quotation marks.

FALSE; Enumerators must be legal C# identifiers

An enum declaration can only appear inside the application's namespace.

FALSE; Outside the application's namespace, Inside the application's namespace, and Inside a class

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

FALSE; The fields can be of different data types

Structure objects can be passed into a method only by reference.

FALSE; can be passed by value or by reference

You can store a mixture of data types in an array.

FALSE; cannot

You use the == operator to compare two array reference variables and determine whether the arrays are equal.

FALSE; cannot use the == operator

When you call a string object's Split method, the method divides the string into two substrings and returns them as an array of strings.

FALSE; he method extracts tokens from the string and returns them as an array of strings

Individual variables are well suited for storing and processing lists of data.

FALSE; not well suited

The objects of a class can be stored in an array, but not in a List.

False; can store in both

A class is an object.

False; describes the object

Class declarations must be written inside the project namespace.

False; not required

One way to find the classes needed for an object-oriented program is to identify all the verbs in a description of the problem domain.

False; nouns

Objects that are instances of a class are always passed by value.

False; passed by reference

Class fields are almost always declared public in order to make their values easily accessible to code outside of the class.

False; private in order to protect them from accidental corruption

A jagged array is similar to a two-dimensional array, but the rows in a jagged array can have different numbers of columns.

TRUE

Before you can use the structure to store data, you must create an instance of the structure in memory.

TRUE

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

TRUE

ImageList controls are designed to store small images such as icons or thumbnails.

TRUE

It is a common practice to make all a class's fields private and to provide access to those fields through methods.

TRUE

Reference variables can be used only to reference objects.

TRUE

The integer values that you assign to enumerators do not have to be unique.

TRUE

The subscript of the last element will always be one less than the array's Length property.

TRUE

When you are working with a value type, you are using a variable that holds a piece of data.

TRUE

When you create a List object, you do not have to know the number of items that you intend to store in it.

TRUE

When you create a numeric array in C#, its elements are set to the value 0 by default.

TRUE

You can compare enumerators and enum variables with relational operators.

TRUE

You cannot perform comparison operations directly on structure objects.

TRUE

Arrays are reference type objects.

True

Constructors can accept arguments in the same way as other methods.

True

Every form in a Visual C# project has a class.

True

If you need to make a property read only, you simply do not write a set accessor for the property.

True

If you try to pass a property to a ref or an out parameter, an error will occur.

True

It is legal to write a class without any constructors.

True

The get accessor can be thought of as a method that returns the class property's value.

True

The same rules for naming variables apply to naming classes.

True


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

FINAL REVIEW MACROECONOMICS (CH. 14-16), MACROCEONOMICS CH. 16, MACROECONOMICS CH. 15, MACROECONOMICS CH. 14, MACROECONOMICS EXAM #3, MACROECONOMICS CH. 13, MACROECONOMICS CH. 12, MACROECONOMICS CH. 11

View Set

Dynamic Study Modules - Sections 21.5 - 21.9

View Set

Contracts Decision Trees - Galbraith

View Set