SlideShare uma empresa Scribd logo
1 de 2
How many times will the following loop print hello?
i = 1;
while ( i <= 10 )
cout << "hello";
A.0.
B.9.
C.10.
D.An infinite number of times.
Solution
/* if we use this code */
/* main.cpp */
#include <iostream>
using namespace std;
int main()
{
int i = 1;
while ( i <= 10 )
cout << "hello";
return 0;
}
/* then output will be D. an infinite number of times. */
/* hello will be printed infinite number of times because value of i is not increasing means we
have not used i++ in while loop */
How many times will the following loop print hello-  i - 1- while ( i.docx

Mais conteúdo relacionado

Mais de hjeffrey

How is the nature of 21st century communication changing- How is the n.docx
How is the nature of 21st century communication changing- How is the n.docxHow is the nature of 21st century communication changing- How is the n.docx
How is the nature of 21st century communication changing- How is the n.docxhjeffrey
 
How did the enclosures law fuel the Industrial Revolution in Great Bri.docx
How did the enclosures law fuel the Industrial Revolution in Great Bri.docxHow did the enclosures law fuel the Industrial Revolution in Great Bri.docx
How did the enclosures law fuel the Industrial Revolution in Great Bri.docxhjeffrey
 
How do short-term and long-term orientation relate to corporate profit.docx
How do short-term and long-term orientation relate to corporate profit.docxHow do short-term and long-term orientation relate to corporate profit.docx
How do short-term and long-term orientation relate to corporate profit.docxhjeffrey
 
How does the object-oriented view of component-level design differ fro.docx
How does the object-oriented view of component-level design differ fro.docxHow does the object-oriented view of component-level design differ fro.docx
How does the object-oriented view of component-level design differ fro.docxhjeffrey
 
How do the physical features of mainland Southeast Asia compare and co.docx
How do the physical features of mainland Southeast Asia compare and co.docxHow do the physical features of mainland Southeast Asia compare and co.docx
How do the physical features of mainland Southeast Asia compare and co.docxhjeffrey
 
How do many companies structure the internal audit group-'s reporting.docx
How do many companies structure the internal audit group-'s reporting.docxHow do many companies structure the internal audit group-'s reporting.docx
How do many companies structure the internal audit group-'s reporting.docxhjeffrey
 
How do semaphore relate to Petri Nets in detail-Solutionpetri nets- i.docx
How do semaphore relate to Petri Nets in detail-Solutionpetri nets-  i.docxHow do semaphore relate to Petri Nets in detail-Solutionpetri nets-  i.docx
How do semaphore relate to Petri Nets in detail-Solutionpetri nets- i.docxhjeffrey
 
How do you show charging by induction using a comb- or another plastic.docx
How do you show charging by induction using a comb- or another plastic.docxHow do you show charging by induction using a comb- or another plastic.docx
How do you show charging by induction using a comb- or another plastic.docxhjeffrey
 
How do taxes impact your accumulation-SolutionThere are three asset it.docx
How do taxes impact your accumulation-SolutionThere are three asset it.docxHow do taxes impact your accumulation-SolutionThere are three asset it.docx
How do taxes impact your accumulation-SolutionThere are three asset it.docxhjeffrey
 
How does sucrose and lactose react to Bial-'s test- How does sucrose.docx
How does sucrose and lactose react to Bial-'s test-  How does sucrose.docxHow does sucrose and lactose react to Bial-'s test-  How does sucrose.docx
How does sucrose and lactose react to Bial-'s test- How does sucrose.docxhjeffrey
 
How did the DI change in 2013SolutionCompletelly Discussion on world c.docx
How did the DI change in 2013SolutionCompletelly Discussion on world c.docxHow did the DI change in 2013SolutionCompletelly Discussion on world c.docx
How did the DI change in 2013SolutionCompletelly Discussion on world c.docxhjeffrey
 
How do you write dissociation equations for equilibrium and how do you.docx
How do you write dissociation equations for equilibrium and how do you.docxHow do you write dissociation equations for equilibrium and how do you.docx
How do you write dissociation equations for equilibrium and how do you.docxhjeffrey
 
how do I create an array in java using a for loop-Solutionimport java-.docx
how do I create an array in java using a for loop-Solutionimport java-.docxhow do I create an array in java using a for loop-Solutionimport java-.docx
how do I create an array in java using a for loop-Solutionimport java-.docxhjeffrey
 
how can you use pH to separate Nil) ions from Hg(I) ions- The solubili.docx
how can you use pH to separate Nil) ions from Hg(I) ions- The solubili.docxhow can you use pH to separate Nil) ions from Hg(I) ions- The solubili.docx
how can you use pH to separate Nil) ions from Hg(I) ions- The solubili.docxhjeffrey
 
How can you tell that a reaction happened in the double-displacement r.docx
How can you tell that a reaction happened in the double-displacement r.docxHow can you tell that a reaction happened in the double-displacement r.docx
How can you tell that a reaction happened in the double-displacement r.docxhjeffrey
 
How many of these symmetry elements does this complex have- E C2 -v -h.docx
How many of these symmetry elements does this complex have- E C2 -v -h.docxHow many of these symmetry elements does this complex have- E C2 -v -h.docx
How many of these symmetry elements does this complex have- E C2 -v -h.docxhjeffrey
 
How can you identifiy a DNS frame in wired Ethernent- 1- Is it broadca.docx
How can you identifiy a DNS frame in wired Ethernent- 1- Is it broadca.docxHow can you identifiy a DNS frame in wired Ethernent- 1- Is it broadca.docx
How can you identifiy a DNS frame in wired Ethernent- 1- Is it broadca.docxhjeffrey
 
How would you explain to an intelligent but non-scientifically-educate.docx
How would you explain to an intelligent but non-scientifically-educate.docxHow would you explain to an intelligent but non-scientifically-educate.docx
How would you explain to an intelligent but non-scientifically-educate.docxhjeffrey
 
How can you tell what kind of primary atomic bonding is present by not.docx
How can you tell what kind of primary atomic bonding is present by not.docxHow can you tell what kind of primary atomic bonding is present by not.docx
How can you tell what kind of primary atomic bonding is present by not.docxhjeffrey
 
How to separate the solution of ethanol- iodine- and LiNO3 How to sep.docx
How to separate the solution of ethanol- iodine- and LiNO3  How to sep.docxHow to separate the solution of ethanol- iodine- and LiNO3  How to sep.docx
How to separate the solution of ethanol- iodine- and LiNO3 How to sep.docxhjeffrey
 

Mais de hjeffrey (20)

How is the nature of 21st century communication changing- How is the n.docx
How is the nature of 21st century communication changing- How is the n.docxHow is the nature of 21st century communication changing- How is the n.docx
How is the nature of 21st century communication changing- How is the n.docx
 
How did the enclosures law fuel the Industrial Revolution in Great Bri.docx
How did the enclosures law fuel the Industrial Revolution in Great Bri.docxHow did the enclosures law fuel the Industrial Revolution in Great Bri.docx
How did the enclosures law fuel the Industrial Revolution in Great Bri.docx
 
How do short-term and long-term orientation relate to corporate profit.docx
How do short-term and long-term orientation relate to corporate profit.docxHow do short-term and long-term orientation relate to corporate profit.docx
How do short-term and long-term orientation relate to corporate profit.docx
 
How does the object-oriented view of component-level design differ fro.docx
How does the object-oriented view of component-level design differ fro.docxHow does the object-oriented view of component-level design differ fro.docx
How does the object-oriented view of component-level design differ fro.docx
 
How do the physical features of mainland Southeast Asia compare and co.docx
How do the physical features of mainland Southeast Asia compare and co.docxHow do the physical features of mainland Southeast Asia compare and co.docx
How do the physical features of mainland Southeast Asia compare and co.docx
 
How do many companies structure the internal audit group-'s reporting.docx
How do many companies structure the internal audit group-'s reporting.docxHow do many companies structure the internal audit group-'s reporting.docx
How do many companies structure the internal audit group-'s reporting.docx
 
How do semaphore relate to Petri Nets in detail-Solutionpetri nets- i.docx
How do semaphore relate to Petri Nets in detail-Solutionpetri nets-  i.docxHow do semaphore relate to Petri Nets in detail-Solutionpetri nets-  i.docx
How do semaphore relate to Petri Nets in detail-Solutionpetri nets- i.docx
 
How do you show charging by induction using a comb- or another plastic.docx
How do you show charging by induction using a comb- or another plastic.docxHow do you show charging by induction using a comb- or another plastic.docx
How do you show charging by induction using a comb- or another plastic.docx
 
How do taxes impact your accumulation-SolutionThere are three asset it.docx
How do taxes impact your accumulation-SolutionThere are three asset it.docxHow do taxes impact your accumulation-SolutionThere are three asset it.docx
How do taxes impact your accumulation-SolutionThere are three asset it.docx
 
How does sucrose and lactose react to Bial-'s test- How does sucrose.docx
How does sucrose and lactose react to Bial-'s test-  How does sucrose.docxHow does sucrose and lactose react to Bial-'s test-  How does sucrose.docx
How does sucrose and lactose react to Bial-'s test- How does sucrose.docx
 
How did the DI change in 2013SolutionCompletelly Discussion on world c.docx
How did the DI change in 2013SolutionCompletelly Discussion on world c.docxHow did the DI change in 2013SolutionCompletelly Discussion on world c.docx
How did the DI change in 2013SolutionCompletelly Discussion on world c.docx
 
How do you write dissociation equations for equilibrium and how do you.docx
How do you write dissociation equations for equilibrium and how do you.docxHow do you write dissociation equations for equilibrium and how do you.docx
How do you write dissociation equations for equilibrium and how do you.docx
 
how do I create an array in java using a for loop-Solutionimport java-.docx
how do I create an array in java using a for loop-Solutionimport java-.docxhow do I create an array in java using a for loop-Solutionimport java-.docx
how do I create an array in java using a for loop-Solutionimport java-.docx
 
how can you use pH to separate Nil) ions from Hg(I) ions- The solubili.docx
how can you use pH to separate Nil) ions from Hg(I) ions- The solubili.docxhow can you use pH to separate Nil) ions from Hg(I) ions- The solubili.docx
how can you use pH to separate Nil) ions from Hg(I) ions- The solubili.docx
 
How can you tell that a reaction happened in the double-displacement r.docx
How can you tell that a reaction happened in the double-displacement r.docxHow can you tell that a reaction happened in the double-displacement r.docx
How can you tell that a reaction happened in the double-displacement r.docx
 
How many of these symmetry elements does this complex have- E C2 -v -h.docx
How many of these symmetry elements does this complex have- E C2 -v -h.docxHow many of these symmetry elements does this complex have- E C2 -v -h.docx
How many of these symmetry elements does this complex have- E C2 -v -h.docx
 
How can you identifiy a DNS frame in wired Ethernent- 1- Is it broadca.docx
How can you identifiy a DNS frame in wired Ethernent- 1- Is it broadca.docxHow can you identifiy a DNS frame in wired Ethernent- 1- Is it broadca.docx
How can you identifiy a DNS frame in wired Ethernent- 1- Is it broadca.docx
 
How would you explain to an intelligent but non-scientifically-educate.docx
How would you explain to an intelligent but non-scientifically-educate.docxHow would you explain to an intelligent but non-scientifically-educate.docx
How would you explain to an intelligent but non-scientifically-educate.docx
 
How can you tell what kind of primary atomic bonding is present by not.docx
How can you tell what kind of primary atomic bonding is present by not.docxHow can you tell what kind of primary atomic bonding is present by not.docx
How can you tell what kind of primary atomic bonding is present by not.docx
 
How to separate the solution of ethanol- iodine- and LiNO3 How to sep.docx
How to separate the solution of ethanol- iodine- and LiNO3  How to sep.docxHow to separate the solution of ethanol- iodine- and LiNO3  How to sep.docx
How to separate the solution of ethanol- iodine- and LiNO3 How to sep.docx
 

Último

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
 
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
 
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
 
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
 
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
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
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
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
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
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
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
 
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
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
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
 

Último (20)

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)
 
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Ữ Â...
 
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
 
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
 
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
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
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
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
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.
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
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
 
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
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
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
 

How many times will the following loop print hello- i - 1- while ( i.docx

  • 1. How many times will the following loop print hello? i = 1; while ( i <= 10 ) cout << "hello"; A.0. B.9. C.10. D.An infinite number of times. Solution /* if we use this code */ /* main.cpp */ #include <iostream> using namespace std; int main() { int i = 1; while ( i <= 10 ) cout << "hello"; return 0; } /* then output will be D. an infinite number of times. */ /* hello will be printed infinite number of times because value of i is not increasing means we have not used i++ in while loop */