CNIT 175 - Exam 1 Questions And Answers Already Passed
CNIT 175 - Exam 1 Questions And Answers Already Passed What will be displayed? Dim Ctr As Short For Ctr = 1 To 10 Step 2 lblOutput.Text = lblOutput.Text & Ctr.ToString() & vbLf Next Ctr 1, 3, 5, 7, 9 What is the outcome? Dim N As Short Dim Sum As Short Do While N <= 10 Sum = Sum + N Loop lblOutput.Text = Sum.ToString() this is an infinite loop program will be locked What will be displayed byf executing the following loop? Dim Ctr As Integer = 1 Do Until Ctr >= 5 lstShow.Items.Add ( Ctr ) Ctr = Ctr + 1 Loop 1, 2, 3, 4 In a pre-test loop, when is the loop condition evaluated? at the beginning of each cycle What will be displayed by execution of the following loop? Dim N As Integer = 0 Do Until N > 10 lstShow.Items.Add(N) N = N + 2 Loop 0, 2, 4, 6, 8, 10 What will be displayed? Dim N As Short = 1 Dim Sum As Short = 0 Do While N >= 10 Sum = Sum + N N = N + 2 Loop lblOutput.Text = Sum.ToString() will not be executed 0 will be displayed TextBox control to get user's INPUT during program execution Label control used to display program's OUTPUT Label control placed next to another GUI object to DESCRIBE its purpose Button control used to INITIATE ACTION Assume a variable "PetName" of type string has already been declared. What statement would assign the name "Luna" to the variable PetName? [x]=[y] x = PetName y = "Luna" PetName = "Luna" What data type should be used to declare a variable to store monetary values? Decimal in a VB project, to use a GUI object in the code, you must use its ____________ property. Name Assume a variable 'Price' of type Decimal has already been declared. What statement would assign 3.99 to the variable Price? [x] = [y] x = Price y = 3.99 Price = 3.99 String -literal is a stream of characters -enclosed between double quotes " ". Variables used to STORE and REMEMBER data values in a program Concatenation linking two strings forming a
Written for
- Institution
- CNIT 242
- Course
- CNIT 242
Document information
- Uploaded on
- January 30, 2024
- Number of pages
- 18
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
cnit 175 exam 1 questions and answers already pa
Also available in package deal