The loop condition x=3 uses the assignment operator = instead of the comparison operator ==. The assignment expression evaluates to 3, which is treated as a truthy value in C/C++. Because this condition is always true, the loop will execute infinitely (forever).