C program behavior differs sometimes between Xcode execution and execution under Terminal, so at some point in development I move the executable from Xcode folders to my desktop for final testing. With my new new laptop (Monterey) and Finder, I cannot find the executable in my Xcode project. Where does Xcode store the executable program when I use RUN
File locations under Xcode 13.4.1 on Monterey 12.5.1
In Xcode choose Product > Show Build Folder in Finder to find your executable in the Finder.
Choosing File > Project Settings will open a sheet. The Derived Data location is where Xcode places the executable it builds. If you want the executable in the same folder as your project, choose Project-relative Location from the Derived Data menu.