I Have Written a Code using while loop to print the Lines for Times. So I just wrote a code as in tutorial but the output of the programm is just infinity print .
So kindly explain to me
code link - cpp.sh/3fr6f
I Have Written a Code using while loop to print the Lines for Times. So I just wrote a code as in tutorial but the output of the programm is just infinity print .
So kindly explain to me
code link - cpp.sh/3fr6f
@cseshivendra
Your code does not go in an infinity loop. Your loop only runs 10 times as expected and gives the output
1 This Concept is not clear
2 This Concept is not clear
3 This Concept is not clear
4 This Concept is not clear
5 This Concept is not clear
6 This Concept is not clear
7 This Concept is not clear
8 This Concept is not clear
9 This Concept is not clear
10 This Concept is not clear
Your code would only go in an infinity loop if you write a condition that is always true. In your code , the value of counter exceeds 10 after 10 iterations so it stops.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.