SlideShare a Scribd company logo
1 of 3
VISUAL BASIC QUESTION ---Please tell me the output of this code. Put (*) to denote spaces
Dim x, y, z As Integer
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
End Sub
Sub donald()
x = 8
y = 6
z = 3
Louie()
Hewey()
Louie()
Dewey
Louie()
End Sub
Sub Hewey()
x -= 6
y += 4
z -= 9
End Sub
Sub dewey()
x = y
y = z
z *= 7
End Sub
Sub louie()
lstDisplay.Items.Add(String.Format(?))
End Sub
Solution
Code Compiled in visual studio 2008
for  Hewey() the result is x=8-6=2 ,y=6+4=10 , z=3-9=-6
for  dewey() the result is x=10,y=-6, z=-42
code is :
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Public Class Form1
Dim x, y, z As Integer
Friend WithEvents lstDisplay As ListBox
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
End Sub
Sub donald()
x = 8
y = 6
z = 3
louie()
Hewey()
louie()
dewey()
louie()
End Sub
Sub Hewey()
x -= 6
y += 4
z -= 9
End Sub
Sub dewey()
x = y
y = z
z *= 7
End Sub
Sub louie()
lstDisplay.Items.Add(String.Format("?"))
End Sub
End Class

More Related Content

Similar to VISUAL BASIC QUESTION ---Please tell me the output of this code- Put (.docx

Similar to VISUAL BASIC QUESTION ---Please tell me the output of this code- Put (.docx (9)

Python_2023.pptx
Python_2023.pptxPython_2023.pptx
Python_2023.pptx
 
intro22.ppt
intro22.pptintro22.ppt
intro22.ppt
 
intro22.ppt
intro22.pptintro22.ppt
intro22.ppt
 
Intro22
Intro22Intro22
Intro22
 
python programming
python programmingpython programming
python programming
 
introduction to python, fundamentals and basics
introduction to python, fundamentals and basicsintroduction to python, fundamentals and basics
introduction to python, fundamentals and basics
 
Introduction to-java
Introduction to-javaIntroduction to-java
Introduction to-java
 
Declare Your Language: Dynamic Semantics
Declare Your Language: Dynamic SemanticsDeclare Your Language: Dynamic Semantics
Declare Your Language: Dynamic Semantics
 
とある断片の超動的言語
とある断片の超動的言語とある断片の超動的言語
とある断片の超動的言語
 

More from mtruman1

Wages and salaries incurred in March amounted to $10-000- of which $4-.docx
Wages and salaries incurred in March amounted to $10-000- of which $4-.docxWages and salaries incurred in March amounted to $10-000- of which $4-.docx
Wages and salaries incurred in March amounted to $10-000- of which $4-.docxmtruman1
 
Visual Studio Short Answer- 1- What is the name of the tool that lets.docx
Visual Studio Short Answer- 1- What is the name of the tool that lets.docxVisual Studio Short Answer- 1- What is the name of the tool that lets.docx
Visual Studio Short Answer- 1- What is the name of the tool that lets.docxmtruman1
 
Visit two or more social media sites and review information that peopl.docx
Visit two or more social media sites and review information that peopl.docxVisit two or more social media sites and review information that peopl.docx
Visit two or more social media sites and review information that peopl.docxmtruman1
 
Visual Basic Short Answer- 1- What is the primary advantage to definin.docx
Visual Basic Short Answer- 1- What is the primary advantage to definin.docxVisual Basic Short Answer- 1- What is the primary advantage to definin.docx
Visual Basic Short Answer- 1- What is the primary advantage to definin.docxmtruman1
 
Vanadium is a transition metal that can be found in the four consecuti.docx
Vanadium is a transition metal that can be found in the four consecuti.docxVanadium is a transition metal that can be found in the four consecuti.docx
Vanadium is a transition metal that can be found in the four consecuti.docxmtruman1
 
Virtual Computing Questions-- Answer both questions in 500-600 words W.docx
Virtual Computing Questions-- Answer both questions in 500-600 words W.docxVirtual Computing Questions-- Answer both questions in 500-600 words W.docx
Virtual Computing Questions-- Answer both questions in 500-600 words W.docxmtruman1
 
VB Create a Class named file that contains the following properties- I.docx
VB Create a Class named file that contains the following properties- I.docxVB Create a Class named file that contains the following properties- I.docx
VB Create a Class named file that contains the following properties- I.docxmtruman1
 
Virtual Computing Question-- Answer the following question that listed.docx
Virtual Computing Question-- Answer the following question that listed.docxVirtual Computing Question-- Answer the following question that listed.docx
Virtual Computing Question-- Answer the following question that listed.docxmtruman1
 
Ventura Capital is a financier who specializes in capitalizing start-u (1).docx
Ventura Capital is a financier who specializes in capitalizing start-u (1).docxVentura Capital is a financier who specializes in capitalizing start-u (1).docx
Ventura Capital is a financier who specializes in capitalizing start-u (1).docxmtruman1
 
VB -What is the primary advantage to defining an interface type in an.docx
VB -What is the primary advantage to defining an interface type in an.docxVB -What is the primary advantage to defining an interface type in an.docx
VB -What is the primary advantage to defining an interface type in an.docxmtruman1
 
Valence electrons are not responsible for A- B- O D- The chemical reac.docx
Valence electrons are not responsible for A- B- O D- The chemical reac.docxValence electrons are not responsible for A- B- O D- The chemical reac.docx
Valence electrons are not responsible for A- B- O D- The chemical reac.docxmtruman1
 
Vertically polarized light that has an intensity of 200 W-m2 is incide.docx
Vertically polarized light that has an intensity of 200 W-m2 is incide.docxVertically polarized light that has an intensity of 200 W-m2 is incide.docx
Vertically polarized light that has an intensity of 200 W-m2 is incide.docxmtruman1
 
Week 4 - HIDS or AntiVirus Systems Research Paper The focus of the res (1).docx
Week 4 - HIDS or AntiVirus Systems Research Paper The focus of the res (1).docxWeek 4 - HIDS or AntiVirus Systems Research Paper The focus of the res (1).docx
Week 4 - HIDS or AntiVirus Systems Research Paper The focus of the res (1).docxmtruman1
 
Week 2 Discussion- I need help understanding the following question- C.docx
Week 2 Discussion- I need help understanding the following question- C.docxWeek 2 Discussion- I need help understanding the following question- C.docx
Week 2 Discussion- I need help understanding the following question- C.docxmtruman1
 
We will assume the universe is expanding at a constant rate- At t - t0.docx
We will assume the universe is expanding at a constant rate- At t - t0.docxWe will assume the universe is expanding at a constant rate- At t - t0.docx
We will assume the universe is expanding at a constant rate- At t - t0.docxmtruman1
 
We normally think of the arts as very different from technologies in s.docx
We normally think of the arts as very different from technologies in s.docxWe normally think of the arts as very different from technologies in s.docx
We normally think of the arts as very different from technologies in s.docxmtruman1
 
We discussed how the processor routes data between internal components.docx
We discussed how the processor routes data between internal components.docxWe discussed how the processor routes data between internal components.docx
We discussed how the processor routes data between internal components.docxmtruman1
 
We normally think of the arts as very different from technologies in s (1).docx
We normally think of the arts as very different from technologies in s (1).docxWe normally think of the arts as very different from technologies in s (1).docx
We normally think of the arts as very different from technologies in s (1).docxmtruman1
 
We reproduce the class Money here- in part- class Money{ public- Mone.docx
We reproduce the class Money here- in part- class Money{ public-  Mone.docxWe reproduce the class Money here- in part- class Money{ public-  Mone.docx
We reproduce the class Money here- in part- class Money{ public- Mone.docxmtruman1
 
We have two oscillators- used to measure time- One is a vertical mass-.docx
We have two oscillators- used to measure time- One is a vertical mass-.docxWe have two oscillators- used to measure time- One is a vertical mass-.docx
We have two oscillators- used to measure time- One is a vertical mass-.docxmtruman1
 

More from mtruman1 (20)

Wages and salaries incurred in March amounted to $10-000- of which $4-.docx
Wages and salaries incurred in March amounted to $10-000- of which $4-.docxWages and salaries incurred in March amounted to $10-000- of which $4-.docx
Wages and salaries incurred in March amounted to $10-000- of which $4-.docx
 
Visual Studio Short Answer- 1- What is the name of the tool that lets.docx
Visual Studio Short Answer- 1- What is the name of the tool that lets.docxVisual Studio Short Answer- 1- What is the name of the tool that lets.docx
Visual Studio Short Answer- 1- What is the name of the tool that lets.docx
 
Visit two or more social media sites and review information that peopl.docx
Visit two or more social media sites and review information that peopl.docxVisit two or more social media sites and review information that peopl.docx
Visit two or more social media sites and review information that peopl.docx
 
Visual Basic Short Answer- 1- What is the primary advantage to definin.docx
Visual Basic Short Answer- 1- What is the primary advantage to definin.docxVisual Basic Short Answer- 1- What is the primary advantage to definin.docx
Visual Basic Short Answer- 1- What is the primary advantage to definin.docx
 
Vanadium is a transition metal that can be found in the four consecuti.docx
Vanadium is a transition metal that can be found in the four consecuti.docxVanadium is a transition metal that can be found in the four consecuti.docx
Vanadium is a transition metal that can be found in the four consecuti.docx
 
Virtual Computing Questions-- Answer both questions in 500-600 words W.docx
Virtual Computing Questions-- Answer both questions in 500-600 words W.docxVirtual Computing Questions-- Answer both questions in 500-600 words W.docx
Virtual Computing Questions-- Answer both questions in 500-600 words W.docx
 
VB Create a Class named file that contains the following properties- I.docx
VB Create a Class named file that contains the following properties- I.docxVB Create a Class named file that contains the following properties- I.docx
VB Create a Class named file that contains the following properties- I.docx
 
Virtual Computing Question-- Answer the following question that listed.docx
Virtual Computing Question-- Answer the following question that listed.docxVirtual Computing Question-- Answer the following question that listed.docx
Virtual Computing Question-- Answer the following question that listed.docx
 
Ventura Capital is a financier who specializes in capitalizing start-u (1).docx
Ventura Capital is a financier who specializes in capitalizing start-u (1).docxVentura Capital is a financier who specializes in capitalizing start-u (1).docx
Ventura Capital is a financier who specializes in capitalizing start-u (1).docx
 
VB -What is the primary advantage to defining an interface type in an.docx
VB -What is the primary advantage to defining an interface type in an.docxVB -What is the primary advantage to defining an interface type in an.docx
VB -What is the primary advantage to defining an interface type in an.docx
 
Valence electrons are not responsible for A- B- O D- The chemical reac.docx
Valence electrons are not responsible for A- B- O D- The chemical reac.docxValence electrons are not responsible for A- B- O D- The chemical reac.docx
Valence electrons are not responsible for A- B- O D- The chemical reac.docx
 
Vertically polarized light that has an intensity of 200 W-m2 is incide.docx
Vertically polarized light that has an intensity of 200 W-m2 is incide.docxVertically polarized light that has an intensity of 200 W-m2 is incide.docx
Vertically polarized light that has an intensity of 200 W-m2 is incide.docx
 
Week 4 - HIDS or AntiVirus Systems Research Paper The focus of the res (1).docx
Week 4 - HIDS or AntiVirus Systems Research Paper The focus of the res (1).docxWeek 4 - HIDS or AntiVirus Systems Research Paper The focus of the res (1).docx
Week 4 - HIDS or AntiVirus Systems Research Paper The focus of the res (1).docx
 
Week 2 Discussion- I need help understanding the following question- C.docx
Week 2 Discussion- I need help understanding the following question- C.docxWeek 2 Discussion- I need help understanding the following question- C.docx
Week 2 Discussion- I need help understanding the following question- C.docx
 
We will assume the universe is expanding at a constant rate- At t - t0.docx
We will assume the universe is expanding at a constant rate- At t - t0.docxWe will assume the universe is expanding at a constant rate- At t - t0.docx
We will assume the universe is expanding at a constant rate- At t - t0.docx
 
We normally think of the arts as very different from technologies in s.docx
We normally think of the arts as very different from technologies in s.docxWe normally think of the arts as very different from technologies in s.docx
We normally think of the arts as very different from technologies in s.docx
 
We discussed how the processor routes data between internal components.docx
We discussed how the processor routes data between internal components.docxWe discussed how the processor routes data between internal components.docx
We discussed how the processor routes data between internal components.docx
 
We normally think of the arts as very different from technologies in s (1).docx
We normally think of the arts as very different from technologies in s (1).docxWe normally think of the arts as very different from technologies in s (1).docx
We normally think of the arts as very different from technologies in s (1).docx
 
We reproduce the class Money here- in part- class Money{ public- Mone.docx
We reproduce the class Money here- in part- class Money{ public-  Mone.docxWe reproduce the class Money here- in part- class Money{ public-  Mone.docx
We reproduce the class Money here- in part- class Money{ public- Mone.docx
 
We have two oscillators- used to measure time- One is a vertical mass-.docx
We have two oscillators- used to measure time- One is a vertical mass-.docxWe have two oscillators- used to measure time- One is a vertical mass-.docx
We have two oscillators- used to measure time- One is a vertical mass-.docx
 

Recently uploaded

How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 

Recently uploaded (20)

How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 

VISUAL BASIC QUESTION ---Please tell me the output of this code- Put (.docx

  • 1. VISUAL BASIC QUESTION ---Please tell me the output of this code. Put (*) to denote spaces Dim x, y, z As Integer Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click End Sub Sub donald() x = 8 y = 6 z = 3 Louie() Hewey() Louie() Dewey Louie() End Sub Sub Hewey() x -= 6 y += 4 z -= 9 End Sub Sub dewey() x = y y = z z *= 7
  • 2. End Sub Sub louie() lstDisplay.Items.Add(String.Format(?)) End Sub Solution Code Compiled in visual studio 2008 for  Hewey() the result is x=8-6=2 ,y=6+4=10 , z=3-9=-6 for  dewey() the result is x=10,y=-6, z=-42 code is : Imports System Imports System.Drawing Imports System.Windows.Forms Public Class Form1 Dim x, y, z As Integer Friend WithEvents lstDisplay As ListBox Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click End Sub Sub donald() x = 8 y = 6 z = 3 louie() Hewey() louie()
  • 3. dewey() louie() End Sub Sub Hewey() x -= 6 y += 4 z -= 9 End Sub Sub dewey() x = y y = z z *= 7 End Sub Sub louie() lstDisplay.Items.Add(String.Format("?")) End Sub End Class