Lets start with C language compiler. xcrun is good command to find out the specific about the system and what sdk version is install, platform and other good stuff that you would need in process.
xcrun -find -sdk iphoneos clang
Below are few variation of command with different available switch. Feel free to try