+ 1
Which loop faster 'for' or 'while'
5 Respostas
+ 13
You can utilise the <chrono> header to find out but I suppose the differences would only be a couple of nanoseconds.
+ 4
It doesn't affect the performance whichever you use and even if it does it is so negligible you wouldn't even know.
+ 1
it should be while since checking a single condition cab enter into the loop and execute. if the statement false, then ends the loop
+ 1
it should be while since by checking a single condition can enter into the loop and execute. if the statement false, then ends the loop