1. Technology

Paste C/C++ and run it online

By March 7, 2008

Follow me on:

As well as the C/C++ interpreters I've mentioned in the past there is another way to compile and run a C or C++ program. Just visit the website codepad.org, select C or C++, paste in your code and click a button. There are eight other programming languages available as well, including D which I mentioned not so long ago. You can view what other people are trying out and there's a lot of C in that list!. Hopefully that's because of the language's popularity and not just because it's the first language alphabetically available!

Codepad is the brain child of Steven Hazel and he's quite keen to see if you can break the system. It uses the free public domain Geordi IRC bot to compile and run C/C++. I can't see it replacing compilers any day soon but if you just want to try something out quick, it doesn't get much easier than this!

March 11, 2008 at 1:59 am
(1) Lennie De Villiers says:

know of anything like this for C#?

March 18, 2008 at 4:34 pm
(2) klein says:

Already broken.
Says that “undefined reference to `main’” EVERYTIME. My code is a printf “Hello World!\n”; program and before that line is the int main().

No problems, but won’t even run that.

June 11, 2009 at 2:51 pm
(3) Patrick Johnmeyer says:

Not sure what problems klein (above) had back in ’08, but it clearly works now.

August 23, 2010 at 7:17 am
(4) Gordon Smith says:

..and is still very much alive and working in 2010.

October 11, 2010 at 9:53 am
(5) Jaztin As-Siddiq says:

Works well, but I still need an online C# compiler :/

October 11, 2010 at 2:02 pm
(6) cplus says:

Well there’s http://compilr.com/ which does C#.Net, Java, VB;

About C,C++ and C#

May 30, 2011 at 10:06 am
(7) Matt says:

Something to point out; compilr can’t actually compile. You can only write programs, but you can’t compile.

May 30, 2011 at 3:22 pm
(8) cplus says:

You are registered and logged in?


June 27, 2011 at 3:50 am
(9) mangesh says:

the input for the c programs is not available in the codepad

September 2, 2011 at 10:39 am
(10) vimal says:

How to provide an input at the run time in codepad…
I did not find any option..

September 27, 2011 at 2:19 am
(11) nubie says:

scanf command doesnt work. how do u provide runtime input?

September 27, 2011 at 2:22 am
(12) nubie says:

hey, can sum1 pls help me with this code? its supposed to display the decimal equivalent of a binary number

November 5, 2011 at 10:05 am
(13) pa.pi says:

please help me m doing an online c compiler application…
But i don’t know what technologies required for that?
If any one knows any thing related to this please do post on this

March 27, 2012 at 9:37 am
(14) Anupam says:

expected declaration or statement at end of input

What does this error mean??….I have no other syntax erreors in my code and I don’t understand why I can’t run it.

April 1, 2012 at 5:25 pm
(15) cplus says:

Most likely it means you’ve left out a closing brace or possibly a semi-colon somewhere. Without seeing the source code, it’s impossible to guess any more.

About C,C++ and C#

August 22, 2012 at 11:50 pm
(16) emerald says:

yeah. not working. have no idea what to do. what’s wrong with this?

September 11, 2012 at 4:39 am
(17) h_497 says:

Where is the site where you can paste in a C++ code and get it complied?

October 17, 2012 at 12:59 pm
(18) vaishali says:

#define MAN(x,y) (x)>(y)?(x):(y)
int i=10,j=9,k=0;
printf(“%d %d %d”,i,j,k);
please explain the output of this program
output is : 12 10 11

November 8, 2012 at 10:07 am
(19) Austin Carey says:

and also in 2012

November 24, 2012 at 2:57 am
(20) gaurav manchanda says:

what is the difference between i++ and ++i in for loop
for ex:

and for (i=0;i<=num;i++)

November 24, 2012 at 1:47 pm
(21) cplus says:

None. Try this short program and see.


int main(int argc, char * argv[])
int i;
for (i=0;i< 10;i++) {
printf ("i= %d\n\r",i);}
for (i=0;i< 10;++i) {
printf ("i= %d\n\r",i);
return 0;

About C,C++, C# and Go

August 3, 2013 at 4:13 pm
(22) B Sai Kiriti says:

There is no support for stdin functions in codepad. I never got scanf working

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2014 About.com. All rights reserved.