Run C program in Linux

On June 27, 2009, in Linux, Tips, Tricks, by Sandeep Verma

Hits: 46   This is the simple C file “svnlabs.c” to execute on linux terminal #include int main() { int i; for(i=0;i<=5;i++) { printf(”n%d %s”,i,”svnlabs.com”); } printf(”n”); return 0; } Output: [root@localhost ~]# gcc svnlabs.c [root@localhost ~]# make svnlabs cc svnlabs.c -o svnlabs [root@localhost ~]# ./svnlabs 0 svnlabs.com 1 svnlabs.com 2 svnlabs.com 3 svnlabs.com 4 svnlabs.com [...]

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...