Fall2011%20MidtermKey - CNIT 175 Midterm KEY Fall 2011 The...

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

View Full Document Right Arrow Icon
CNIT 175 Midterm KEY Fall 2011 100 Points The key is at the end of this document. 1. Visual Basic .NET is: a. An event driven programming language b. A visual programming language c. An object oriented programming language d. All of the above e. None of the above 2. In VB .NET, which control should be used to let the user enter input information such as student’s name? a. Label b. TextBox c. RadioButtons d. Button e. None of the above 3. The keyword for declaring local variables is ----------------. a. Local b. Public c. Private d. Dim e. Sub 4. Which one is NOT a valid name for a variable? a. 3DaysAWeek b. Four_Way_Intersection c. Price-Per-Pound d. All of the above e. a and c 5. What will be stored in M and N after execution of the following segment of code? Dim M As Single Dim N As Integer M = 25 N = 11 M = M \ N a. 3, 11 b. 2, 11 c. 2.27. .., 11 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
d. 25, 11 6. What is the relational operator for not equal in VB? a. ! b. != c. NE d. < > e. = 7. What will be displayed by the following code? Dim N As Integer N = 12 + 6 Mod 4 lblOutput.Text = N.ToString a. 2 b. 4 c. 12 d. 13 e. 14 8. According to the naming standards, what is the prefix for naming a Label? a. lab b. lbl c. txt d. out e. a or b 9. Which statement will properly store the value entered in txtData , in variable Score ? Assume: Dim Score As Byte a. Score = Byte.TryParse(txtData.Text) b. Score = txtData.Text c. Score = Byte.Parse(txtData.Text) d. Score = Short.Parse(txtData.Text) e. Score = Parse(txtData.Text) 10. Given: Dim Salary As Decimal = 24000 Which statement will properly display Salary with currency format, i.e.: $24000.00? a. lblOutput.Text = Salary.ToString(“N”) b. c. lblOutput.Text = Salary.ToString(“C”) d. lblOutput.Text = Salary.ToString(“P”) e. All of the above 2
Background image of page 2
11. What will be stored in N? Dim N As Short N = -10 ^ 2 a. -20 b. 20 c. 100 d. -100 e. None of the above 12. Which property of the Label control allows it to be resized once placed on the form? a. Name b. Text c. BorderStyle d. AutoSize e. BackColor 13. What will be stored in Num after execution of the following segment of code? Dim Negative As Integer Dim Positive As Integer Dim Two As Integer Dim Four As Integer Dim Num As Double Two = 5 Four = 2 Positive = -3 Negative = 1 Num = Negative + Four * Two + Positive a. 14 b. 7 c. 8 d. 12 e. Will generate a Build error. 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
14. Which property of the Checkbox control shows whether it has been selected by the user or not? a. Name b. Text c. Visible d. Checked e. Selected 15. In a Visual Basic project, what is an event? a. The Graphical User Interface is an event b. The Text property of the Form is an event c. Entering data in a TextBox is an event d. Clicking on a Button is an event e. Both c and d 16. What is the outcome if the user enters 2.75 in txtGrade? Dim Grade As Integer
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/06/2012 for the course CNIT 175 taught by Professor Na during the Fall '11 term at Purdue University-West Lafayette.

Page1 / 13

Fall2011%20MidtermKey - CNIT 175 Midterm KEY Fall 2011 The...

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

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