To check for syntax errors in a C program without actually running it, you can use a compiler like gcc with the -fsyntax-only option. This tells the compiler to only check for syntax issues and skip linking or execution.
gcc -fsyntax-only your_file.c