It seems that there might be an issue with CodeBlocks not displaying output in the terminals for Mac M2 chip. To resolve this, you can try updating CodeBlocks to the latest version or check if there are any specific compatibility issues with the M2 chip. Additionally, you can also consider using alternative software such as Xcode or Visual Studio Code for Mac.