Chapter 04 testbank

Chapter 04 testbank - Chapter 4 Multiple Choice Identify...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 4 Multiple Choice Identify the letter of the choice that best completes the statement or answers the question. ____ 1. You want to check the variable sngSales, and change a label lblMessage to say “Great Year” if the value is at least 50,000. Which of the following code segments does this? a. If sngSales > 50000 Then lblMessage.Text = “Great Year” End If b. If sngSales >= 50000 Then lblMessage.Text = “Great Year” End If c. If sngSales < 50000 Then lblMessage.Text = “Great Year” End If d. If sngSales < =50000 Then lblMessage.Text = “Great Year” End If ____ 2. You want to determine whether a variable, sngPayAmount, is between 1200 and 1400 inclusively. If the value is in the range change the lblMessage text to say “Pay amount is in the range” Which of the following code segments will accomplish this? a. If sngPayAmount >=1200 And <= 1400 Then lblMessage.Text = “Pay amount is in the range” End If b. If sngPayAmount <=1200 Or sngPayAmount >= 1400 Then lblMessage.Text = “Pay amount is in the range” End If c. If sngPayAmount >=1200 And sngPayAmount <=1400 then lblMessage.Text = “Pay amount is in the range” End If d. If sngPayAmount > 1200 Or sngPayAmount < 1400 Then .Text = “Pay amount is in the range” End If ____ 3. Visual Basic .NET uses to store characters, such as A, B, and C in memory. a. ASCII code b. BCD code c. Unicode d. Extended ASCII code Chapter 4 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
____ 4. You want to check that the user has entered a value into a text box named txtBox, and respond with the appropriate message if no value has been entered. Which of the following code segments does this? a. If txtBox.text = “ “ Then MessageBox.Show(“No data has been entered”) End If b. If txtBox.Text <> “blank“ Then MessageBox.Show(“ data has been entered”) End If c. If txtBox.Text = “” Then MessageBox.Show(“No data has been entered”) End If d. If txtBox
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/24/2011 for the course MGT 561 taught by Professor Kartbenson during the Fall '09 term at USC.

Page1 / 10

Chapter 04 testbank - Chapter 4 Multiple Choice Identify...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online