In this question I learned how to use Sublime Text 2 to compile a C program:
How to compile and run a simple C program with Sublime Text 2?
How do I also make the program run from within Sublime Text 2?
In this question I learned how to use Sublime Text 2 to compile a C program:
How to compile and run a simple C program with Sublime Text 2?
How do I also make the program run from within Sublime Text 2?
Edit your build file to add the command that runs the program. You can see the output of the program in the ST console by hitting ctrl+~.
{
"cmd" : ["gcc", "$file_name", "-o", "${file_base_name}.exe", "&&", "${file_base_name}.exe"],
"selector" : "source.c",
"shell" : true,
"working_dir" : "$file_path"
}
As an alternative, you could make a shell script or Makefile that compiles and runs the file and then call the script or make from the ST build command.