8.9.3 Fast Enumeration Details

Here is a more technical description with the gory details. Consider the code

for (object expression in collection expression)
{
  statements
}

here is what happens when you run it:

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Fast-enumeration-details.html