Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 - Which of the following for headers is correct? for (int i = 12, i > 5, i --) for ( int idx =

1 -

Which of the following for headers is correct?

for (int i = 12, i > 5, i --)

for ( int idx = 2; idx ++, idx <22)

for (int mask = 1; mask < 1025; mask *= 2)

None of the above are correct

2-

What is the result of the following code?

int [][] matrix = new int[3][];

for (int idx = 0; idx < matrix.Length; idx ++)

{

matrix[idx] = new int[idx *2 +1];

}

A jagged array will be created

the first row will have an array of size 1

the second will have an array of size 3

A jagged array will be created

the first row will have an array of size 1

the second will have an array of size 3

the third row will have an array of size 5

the fourth row will have an array of size 7

A jagged array will be created

the first row will have an array of size 1

the second will have an array of size 3

the third row will have an array of size 5

A multi dimensional array will be created with the dimensions of [3,7]

3-

Use a for loop to duplicate the functionality of the following code snippet

int i = 5; 
while (i >= -5) { MessageBox.Show( i + " fezzes are cool" ); i = i - 1; } 

4 -

How would set up 6 radio buttons so that I can have 2 groups of 3, where only one button in group1 can be selected and one button in group 2 can be selected?

If I select a different radio button in group 1, the previously selected button will become deselected and the new one is selected.

Name three of the radio buttons the same name, assigning them different text values

Name the other three radio buttons the same name (but different from the first set), assigning them all different values

Set the grouping property of the first set to of radio buttons to group1 and the grouping property of the second set to group2

Select three of the radio buttons, right click and choose group together.

Select the other three, right click and select group together.

Add three radio buttons to one panel, and three other radio buttons to another panel

5-

Given the list nameList which contains {"Chris", "Kaylee", "Kathryn", "Jon"} what would be returned by

nameList.IndexOf("Kaylee")

6 -

Which of the following is the correct output for the following code snippet?

public bool IsOdd( int testValue)

{

return (testValue % 2 == 1);

}

...

MessageBox.Show(IsOdd(12).ToString());

A message box will display True

A message box will display False

A message box will display bool

This will not compile

7 -

How would you assign the following variable to myTextbox?

int myCoolValue = 22;

myTextbox.Text = myCoolValue;

myTextbox.Text( myCoolValue );

myTextbox.Text = String.Convert( myCoolValue );

myTextbox.Text = myCoolValue.ToString();

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions