I'm not a programmer, but I understand it somewhat. I grabbed the folowing snipet of code from a C++ book to illustrate my simile and I need to know if it's accurate.
My thoughts run like badly written code stuck in an endless loop:
for(int i = 0; i >= 0; i++)
{
cout << i << endl;
}
If I understand this correctly, this will continuously output "0" because it creates an endless loop since "i" will always be greater than "0". Am I correct?
Anyone want to write a more impressive example of an endless loop?
My thoughts run like badly written code stuck in an endless loop:
for(int i = 0; i >= 0; i++)
{
cout << i << endl;
}
If I understand this correctly, this will continuously output "0" because it creates an endless loop since "i" will always be greater than "0". Am I correct?
Anyone want to write a more impressive example of an endless loop?