SlideShare uma empresa Scribd logo
1 de 2
What output is produced by the following code? Int count = 0; do { system. out. print in(count);
cout ++} while (count
Solution
Answer:
0
Count after loop = 2
Explanation:
There are some systex errors. i have fixed it. Below is the right code for execution. Highlighted
(Bold) areas are the code changes.
int count = 0;
do{
System.out.println(count);
count++ ;
}while(count < 0);
System.out.println("Count after loop = "+ (++count) );
At First line, count variable value is 0. Since we are using do while loop, without checking
condition do statements will execute. So line 3 will execute and print count variabe as 0. At line
4, count variable will increment by 1. so count variable value at line 4 is 1. at line 5, condition
fails so loop will terminate. So line 6 will execute and print count variable as 2.
So The final output is below
0
Count after loop = 2
What output is produced by the following code- Int count - 0- do { sys.docx

Mais conteúdo relacionado

Semelhante a What output is produced by the following code- Int count - 0- do { sys.docx

Number system computer fundamental
 Number  system computer fundamental  Number  system computer fundamental
Number system computer fundamental Aman anand kumar
 
Write the code in C, here is the template providedThe input used .pdf
Write the code in C, here is the template providedThe input used .pdfWrite the code in C, here is the template providedThe input used .pdf
Write the code in C, here is the template providedThe input used .pdfsales223546
 
Computer arithmetics (computer organisation &amp; arithmetics) ppt
Computer arithmetics (computer organisation &amp; arithmetics) pptComputer arithmetics (computer organisation &amp; arithmetics) ppt
Computer arithmetics (computer organisation &amp; arithmetics) pptSuryaKumarSahani
 
data representation
 data representation data representation
data representationHaroon_007
 
Computer arithmetics coa project pdf version
Computer arithmetics coa project pdf versionComputer arithmetics coa project pdf version
Computer arithmetics coa project pdf versionSuryaKumarSahani
 
2s complement arithmetic
2s complement arithmetic2s complement arithmetic
2s complement arithmeticSanjay Saluth
 
CP4151 ADSA unit1 Advanced Data Structures and Algorithms
CP4151 ADSA unit1 Advanced Data Structures and AlgorithmsCP4151 ADSA unit1 Advanced Data Structures and Algorithms
CP4151 ADSA unit1 Advanced Data Structures and AlgorithmsSheba41
 
Lesson 24. Phantom errors
Lesson 24. Phantom errorsLesson 24. Phantom errors
Lesson 24. Phantom errorsPVS-Studio
 
ch05-program-logic-indefinite-loops.ppt
ch05-program-logic-indefinite-loops.pptch05-program-logic-indefinite-loops.ppt
ch05-program-logic-indefinite-loops.pptMahyuddin8
 
Manoch1raw 160512091436
Manoch1raw 160512091436Manoch1raw 160512091436
Manoch1raw 160512091436marangburu42
 
Computer organization and architecture lab manual
Computer organization and architecture lab manual Computer organization and architecture lab manual
Computer organization and architecture lab manual Shankar Gangaju
 
For loop java 2
For loop java 2For loop java 2
For loop java 2ASU Online
 
Unit2- line clipping.pptx
Unit2- line clipping.pptxUnit2- line clipping.pptx
Unit2- line clipping.pptxRYZEN14
 

Semelhante a What output is produced by the following code- Int count - 0- do { sys.docx (20)

Number system computer fundamental
 Number  system computer fundamental  Number  system computer fundamental
Number system computer fundamental
 
For loop java
For loop javaFor loop java
For loop java
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
Write the code in C, here is the template providedThe input used .pdf
Write the code in C, here is the template providedThe input used .pdfWrite the code in C, here is the template providedThe input used .pdf
Write the code in C, here is the template providedThe input used .pdf
 
Computer arithmetics (computer organisation &amp; arithmetics) ppt
Computer arithmetics (computer organisation &amp; arithmetics) pptComputer arithmetics (computer organisation &amp; arithmetics) ppt
Computer arithmetics (computer organisation &amp; arithmetics) ppt
 
8254.pptx
8254.pptx8254.pptx
8254.pptx
 
data representation
 data representation data representation
data representation
 
Computer arithmetics coa project pdf version
Computer arithmetics coa project pdf versionComputer arithmetics coa project pdf version
Computer arithmetics coa project pdf version
 
2s complement arithmetic
2s complement arithmetic2s complement arithmetic
2s complement arithmetic
 
Hex keypad
Hex keypadHex keypad
Hex keypad
 
ALGO.ppt
ALGO.pptALGO.ppt
ALGO.ppt
 
CP4151 ADSA unit1 Advanced Data Structures and Algorithms
CP4151 ADSA unit1 Advanced Data Structures and AlgorithmsCP4151 ADSA unit1 Advanced Data Structures and Algorithms
CP4151 ADSA unit1 Advanced Data Structures and Algorithms
 
algorithm
algorithmalgorithm
algorithm
 
Lesson 24. Phantom errors
Lesson 24. Phantom errorsLesson 24. Phantom errors
Lesson 24. Phantom errors
 
ch05-program-logic-indefinite-loops.ppt
ch05-program-logic-indefinite-loops.pptch05-program-logic-indefinite-loops.ppt
ch05-program-logic-indefinite-loops.ppt
 
Manoch1raw 160512091436
Manoch1raw 160512091436Manoch1raw 160512091436
Manoch1raw 160512091436
 
Computer organization and architecture lab manual
Computer organization and architecture lab manual Computer organization and architecture lab manual
Computer organization and architecture lab manual
 
For loop java 2
For loop java 2For loop java 2
For loop java 2
 
Unit2- line clipping.pptx
Unit2- line clipping.pptxUnit2- line clipping.pptx
Unit2- line clipping.pptx
 
Python Math Concepts Book
Python Math Concepts BookPython Math Concepts Book
Python Math Concepts Book
 

Mais de earleanp

Create your own variant of both a hiring and a termination policy rela.docx
Create your own variant of both a hiring and a termination policy rela.docxCreate your own variant of both a hiring and a termination policy rela.docx
Create your own variant of both a hiring and a termination policy rela.docxearleanp
 
Determine the valuation of long-term liabilities- Donald Lennon is the.docx
Determine the valuation of long-term liabilities- Donald Lennon is the.docxDetermine the valuation of long-term liabilities- Donald Lennon is the.docx
Determine the valuation of long-term liabilities- Donald Lennon is the.docxearleanp
 
Describe three of the following attack types in the Operation Security.docx
Describe three of the following attack types in the Operation Security.docxDescribe three of the following attack types in the Operation Security.docx
Describe three of the following attack types in the Operation Security.docxearleanp
 
Describes the concept of ADTS and illustrates the concept with three o.docx
Describes the concept of ADTS and illustrates the concept with three o.docxDescribes the concept of ADTS and illustrates the concept with three o.docx
Describes the concept of ADTS and illustrates the concept with three o.docxearleanp
 
Describe- manage- and install Active Directory replication- federation.docx
Describe- manage- and install Active Directory replication- federation.docxDescribe- manage- and install Active Directory replication- federation.docx
Describe- manage- and install Active Directory replication- federation.docxearleanp
 
Describe the process to start and restart apache on CENTOS command lin.docx
Describe the process to start and restart apache on CENTOS command lin.docxDescribe the process to start and restart apache on CENTOS command lin.docx
Describe the process to start and restart apache on CENTOS command lin.docxearleanp
 
Describe- in your own words- the mechanism for establishing a HTTPS co.docx
Describe- in your own words- the mechanism for establishing a HTTPS co.docxDescribe- in your own words- the mechanism for establishing a HTTPS co.docx
Describe- in your own words- the mechanism for establishing a HTTPS co.docxearleanp
 
Describe the process of creating and exporting a schedule report for t.docx
Describe the process of creating and exporting a schedule report for t.docxDescribe the process of creating and exporting a schedule report for t.docx
Describe the process of creating and exporting a schedule report for t.docxearleanp
 
Describe the principal technologies that have shaped contemporary tele.docx
Describe the principal technologies that have shaped contemporary tele.docxDescribe the principal technologies that have shaped contemporary tele.docx
Describe the principal technologies that have shaped contemporary tele.docxearleanp
 
Describe the typical duties of a security manager that are strictly ma.docx
Describe the typical duties of a security manager that are strictly ma.docxDescribe the typical duties of a security manager that are strictly ma.docx
Describe the typical duties of a security manager that are strictly ma.docxearleanp
 
Describe the four categories of international airports in the federal.docx
Describe the four categories of international airports in the federal.docxDescribe the four categories of international airports in the federal.docx
Describe the four categories of international airports in the federal.docxearleanp
 
Describe the major types of VPNs and technologies- protocols- and serv.docx
Describe the major types of VPNs and technologies- protocols- and serv.docxDescribe the major types of VPNs and technologies- protocols- and serv.docx
Describe the major types of VPNs and technologies- protocols- and serv.docxearleanp
 
Describe the different metrics that BGP can use in building a routing.docx
Describe the different metrics that BGP can use in building a routing.docxDescribe the different metrics that BGP can use in building a routing.docx
Describe the different metrics that BGP can use in building a routing.docxearleanp
 
Describe the ethnic city and the benefit of ethnic communiti- (-I need.docx
Describe the ethnic city and the benefit of ethnic communiti- (-I need.docxDescribe the ethnic city and the benefit of ethnic communiti- (-I need.docx
Describe the ethnic city and the benefit of ethnic communiti- (-I need.docxearleanp
 
Describe the different types of qualitative analysis and indicate whic.docx
Describe the different types of qualitative analysis and indicate whic.docxDescribe the different types of qualitative analysis and indicate whic.docx
Describe the different types of qualitative analysis and indicate whic.docxearleanp
 
Describe neo-evolution- What is it and what are its primary tenets- Pr.docx
Describe neo-evolution- What is it and what are its primary tenets- Pr.docxDescribe neo-evolution- What is it and what are its primary tenets- Pr.docx
Describe neo-evolution- What is it and what are its primary tenets- Pr.docxearleanp
 
Describe ip protocol security pros and cons-SolutionIP Protocol Securi.docx
Describe ip protocol security pros and cons-SolutionIP Protocol Securi.docxDescribe ip protocol security pros and cons-SolutionIP Protocol Securi.docx
Describe ip protocol security pros and cons-SolutionIP Protocol Securi.docxearleanp
 
Describe core competencies and their relationship to operations manage.docx
Describe core competencies and their relationship to operations manage.docxDescribe core competencies and their relationship to operations manage.docx
Describe core competencies and their relationship to operations manage.docxearleanp
 
Describe in detail a man-in-the-middle attack on the Diffie-Hellman ke.docx
Describe in detail a man-in-the-middle attack on the Diffie-Hellman ke.docxDescribe in detail a man-in-the-middle attack on the Diffie-Hellman ke.docx
Describe in detail a man-in-the-middle attack on the Diffie-Hellman ke.docxearleanp
 
Describe events that led to the signing of the Homeland Security Act 2.docx
Describe events that led to the signing of the Homeland Security Act 2.docxDescribe events that led to the signing of the Homeland Security Act 2.docx
Describe events that led to the signing of the Homeland Security Act 2.docxearleanp
 

Mais de earleanp (20)

Create your own variant of both a hiring and a termination policy rela.docx
Create your own variant of both a hiring and a termination policy rela.docxCreate your own variant of both a hiring and a termination policy rela.docx
Create your own variant of both a hiring and a termination policy rela.docx
 
Determine the valuation of long-term liabilities- Donald Lennon is the.docx
Determine the valuation of long-term liabilities- Donald Lennon is the.docxDetermine the valuation of long-term liabilities- Donald Lennon is the.docx
Determine the valuation of long-term liabilities- Donald Lennon is the.docx
 
Describe three of the following attack types in the Operation Security.docx
Describe three of the following attack types in the Operation Security.docxDescribe three of the following attack types in the Operation Security.docx
Describe three of the following attack types in the Operation Security.docx
 
Describes the concept of ADTS and illustrates the concept with three o.docx
Describes the concept of ADTS and illustrates the concept with three o.docxDescribes the concept of ADTS and illustrates the concept with three o.docx
Describes the concept of ADTS and illustrates the concept with three o.docx
 
Describe- manage- and install Active Directory replication- federation.docx
Describe- manage- and install Active Directory replication- federation.docxDescribe- manage- and install Active Directory replication- federation.docx
Describe- manage- and install Active Directory replication- federation.docx
 
Describe the process to start and restart apache on CENTOS command lin.docx
Describe the process to start and restart apache on CENTOS command lin.docxDescribe the process to start and restart apache on CENTOS command lin.docx
Describe the process to start and restart apache on CENTOS command lin.docx
 
Describe- in your own words- the mechanism for establishing a HTTPS co.docx
Describe- in your own words- the mechanism for establishing a HTTPS co.docxDescribe- in your own words- the mechanism for establishing a HTTPS co.docx
Describe- in your own words- the mechanism for establishing a HTTPS co.docx
 
Describe the process of creating and exporting a schedule report for t.docx
Describe the process of creating and exporting a schedule report for t.docxDescribe the process of creating and exporting a schedule report for t.docx
Describe the process of creating and exporting a schedule report for t.docx
 
Describe the principal technologies that have shaped contemporary tele.docx
Describe the principal technologies that have shaped contemporary tele.docxDescribe the principal technologies that have shaped contemporary tele.docx
Describe the principal technologies that have shaped contemporary tele.docx
 
Describe the typical duties of a security manager that are strictly ma.docx
Describe the typical duties of a security manager that are strictly ma.docxDescribe the typical duties of a security manager that are strictly ma.docx
Describe the typical duties of a security manager that are strictly ma.docx
 
Describe the four categories of international airports in the federal.docx
Describe the four categories of international airports in the federal.docxDescribe the four categories of international airports in the federal.docx
Describe the four categories of international airports in the federal.docx
 
Describe the major types of VPNs and technologies- protocols- and serv.docx
Describe the major types of VPNs and technologies- protocols- and serv.docxDescribe the major types of VPNs and technologies- protocols- and serv.docx
Describe the major types of VPNs and technologies- protocols- and serv.docx
 
Describe the different metrics that BGP can use in building a routing.docx
Describe the different metrics that BGP can use in building a routing.docxDescribe the different metrics that BGP can use in building a routing.docx
Describe the different metrics that BGP can use in building a routing.docx
 
Describe the ethnic city and the benefit of ethnic communiti- (-I need.docx
Describe the ethnic city and the benefit of ethnic communiti- (-I need.docxDescribe the ethnic city and the benefit of ethnic communiti- (-I need.docx
Describe the ethnic city and the benefit of ethnic communiti- (-I need.docx
 
Describe the different types of qualitative analysis and indicate whic.docx
Describe the different types of qualitative analysis and indicate whic.docxDescribe the different types of qualitative analysis and indicate whic.docx
Describe the different types of qualitative analysis and indicate whic.docx
 
Describe neo-evolution- What is it and what are its primary tenets- Pr.docx
Describe neo-evolution- What is it and what are its primary tenets- Pr.docxDescribe neo-evolution- What is it and what are its primary tenets- Pr.docx
Describe neo-evolution- What is it and what are its primary tenets- Pr.docx
 
Describe ip protocol security pros and cons-SolutionIP Protocol Securi.docx
Describe ip protocol security pros and cons-SolutionIP Protocol Securi.docxDescribe ip protocol security pros and cons-SolutionIP Protocol Securi.docx
Describe ip protocol security pros and cons-SolutionIP Protocol Securi.docx
 
Describe core competencies and their relationship to operations manage.docx
Describe core competencies and their relationship to operations manage.docxDescribe core competencies and their relationship to operations manage.docx
Describe core competencies and their relationship to operations manage.docx
 
Describe in detail a man-in-the-middle attack on the Diffie-Hellman ke.docx
Describe in detail a man-in-the-middle attack on the Diffie-Hellman ke.docxDescribe in detail a man-in-the-middle attack on the Diffie-Hellman ke.docx
Describe in detail a man-in-the-middle attack on the Diffie-Hellman ke.docx
 
Describe events that led to the signing of the Homeland Security Act 2.docx
Describe events that led to the signing of the Homeland Security Act 2.docxDescribe events that led to the signing of the Homeland Security Act 2.docx
Describe events that led to the signing of the Homeland Security Act 2.docx
 

Último

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
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIShubhangi Sonawane
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
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
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
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
 
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 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
 

Último (20)

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
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
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
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
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Ữ Â...
 
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 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
 

What output is produced by the following code- Int count - 0- do { sys.docx

  • 1. What output is produced by the following code? Int count = 0; do { system. out. print in(count); cout ++} while (count Solution Answer: 0 Count after loop = 2 Explanation: There are some systex errors. i have fixed it. Below is the right code for execution. Highlighted (Bold) areas are the code changes. int count = 0; do{ System.out.println(count); count++ ; }while(count < 0); System.out.println("Count after loop = "+ (++count) ); At First line, count variable value is 0. Since we are using do while loop, without checking condition do statements will execute. So line 3 will execute and print count variabe as 0. At line 4, count variable will increment by 1. so count variable value at line 4 is 1. at line 5, condition fails so loop will terminate. So line 6 will execute and print count variable as 2. So The final output is below 0 Count after loop = 2