Sheet3 CC114 Feb12

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Arab Academy for Science and Technology and Maritime Transport

COLLEGE OF ENGINEERING & TECHNOLOGY

Lecturer: Course: Semester:

Dr. Walid M. Aly Introductiontoprogramming(CC114) Feb12

Sheet 3
I-Multiple choice Question
1-Hello has data type . a) String b) StringLiteral c) Character d) StringText 2-The ForNext header specifies a) the control variable and its initial value b) the increment or decrement c) the loop-continuation condition d) all four essentials of counter controlled repetition 3-Setting TextBox property ScrollBars to. creates only a vertical scrollbar. a) True b) Vertical c) Up d) Both

4-In a ForNext loop, the control variable is incremented (or decremented). a) after the body of the loop executes b) when keyword To is reached c) while the loop-continuation condition is False d) while the body of the loop executes 5-The and. properties limit the values users can select in the NumericUpDown control. a) Maximum, Minimum b) Top, Bottom c) High, Low d) Max, Min

6-The keywords.. signify the end of a Select Case statement. a) End Case b) End Select c) End Select Case d) Case End

7-Which of the following is a syntax error? a) Having duplicate Case statements in the same Select Case statement b) Having a Case statement in which the value to the left of a To keyword is larger than the value to the right c) Preceding a Case statement with the Case Else statement in a Select Case statement d) Using keyword Is in a Select Case statement 8-separates multiple values tested in a Case statement. a) A comma b) An underscore c) Keyword Also d) A semicolon 9-To prevent a user from modifying text in a TextBox, set its property to False. a) Enabled b) Text c) TextChange d) Editable

10-which case clause will be true whenever the value of the selector in a select case block is greater than or equal 7? a)Case x>7 b) Case x=8 c) Case x>=7 d) Case x<=8

11- what will be the output of the following program?


Sub Main() Dim name As String = "Washington" Select Case name Case "George" Console.Write("George") Case "Wash" Console.Write("Wash") Case "WASHINGTON" Console.Write("WASHINGTON") Case Else Console.Write("Washington") End Select End Sub a) b) c) d) WashWashington Washington WASHINGTONWashington No output

II-Programming Exercise
1-Write a definite loop (For Loop) that prints out the number 2,4,6,8,10 into a ListBox named lstNumbers

You might also like