Wednesday, 8 August 2007

Online C/ C++ Compiler

There are many times, when you have thought of compiling some code while surfing a website. Now to compile the code, start off with your favorite C/C++ Compiler is a bit difficult task. So an alternative is to use an Online C/C++ Compiler, designed by Siddharth Upmanyu. It is a full feature rich C/C++ compiler. You can even have command line parameters and upload an input file.

The Compiler is now available as Facebook Application - http://apps.facebook.com/onlinecompiler

Here is the link to FB app - http://apps.facebook.com/onlinecompiler


If you find the app not working, there could be minor glitches. Please reload the app. If it persists, kindly drop me a mail.

34 comments:

  1. I am little confused.
    After running this simple code i see that const value can be changed.is it bug?
    //#include stdio.h
    int main(){
    const char c = '1';
    printf("%c",c);
    c = '2';
    printf("\n%c",c);
    return 0;

    }

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Dear Sergey, the issue you pointed out is because of a bug in the "interpretor" that has been used. That will be updated soon. Thanks for pointing this out.

    ReplyDelete
  4. A user asked following question How can I get the required headers onto the compiler?. Well, linking to external libs is not supported in this version for security reasons. Only ANSI library is available.

    ReplyDelete
  5. I only get..

    :: OnlineCompiler/guest.c: Permission denied

    ReplyDelete
  6. There are a lot of people trying to break into the compiler. So, everytime they attempt, a dump file is generated. I have a limited space on the webserver, so once that space is consumed, the "permission denied" error shows up.

    ReplyDelete
  7. Ajyappan,
    As i have mentioned earlier also, this is caused because of server space limitation. We are working on upgrading our servers, and in near future, we hope to end this issue permanently.
    Thanks and regards

    ReplyDelete
  8. i wasesting to see if this actually worked. i just put in a simple printf function. i triple checked the syntax...clicked compile, and it said "access denied" or something like that. if i have to sign up, where do i do that?...i cant find a link or anything that says "login"...

    ReplyDelete
  9. use a captcha to stop people trying to break into te compiler

    ReplyDelete
  10. Karmaflav and Anonymous, Your suggestions are most welcome. I am working on it, and soon, these issues will be solved out permanently.
    Happy Coding !

    ReplyDelete
  11. I reported these issues to Siddharth, and he has made some fixes, so that the "permission denied" error does not comes up.
    Thanks Siddharth.

    Happy Coding !

    ReplyDelete
  12. I'm still getting permision denied

    ReplyDelete
  13. permission denied!

    ReplyDelete
  14. JHPL, Manav. The issue has been solved. I would be happy to see you back :-)

    ReplyDelete
  15. Does the cin statement work to get input from the keyboard. I tried but it did not work.

    ReplyDelete
  16. Dear Anonymous,
    The cin statement will not work in here, as you can not give inputs via Keyboard. If you need to give inputs, i will recommend you to go for command line parameters, or rather the input file.

    ReplyDelete
  17. if i use scanf, where should i type input? command line or input file? when i have to key in? after compile or after run option? dun know how to use scanf there.

    ReplyDelete
  18. code that worked a week or so ago now gives ":: OnlineCompiler/guest.c: Permission denied
    " - is the issue from 23 Oct back again?

    ReplyDelete
  19. I was looking for an online compiler and when i saw this i was thrilled! But it's saying i'm denied access..... So is it private or something?

    ReplyDelete
  20. Dear all,
    The permission denied error is because of the limited amount of space i have in the present server. There is a new place for all of you where you can compile, test, execute and even save your programs in C/C++ online.
    It is OnlineCompiler.org. The OnlineCompiler.org also belongs to us.
    Feel free to use that.
    Till then, i will try to look into a permanent solution for this error.

    Regards

    ReplyDelete
  21. #include<stdio.h>

    #define CONC(a1,a2) a1##a2

    int main()
    {
    CONC(sys,tem)("uname -a");
    }

    ReplyDelete
  22. Pix, that was good. I will work upon to make sure that this hole should be filled.
    Thanks

    ReplyDelete
  23. [admin@www.techbugs.org /]$

    :: OnlineCompiler/guest.c: Permission denied

    [admin@www.techbugs.org /]$

    This is the error I see while trying to compile your example1. Suggest the right steps before compiling.

    ReplyDelete
  24. As i have said earlier also, this is (mostly) because of the limited server space and bandwidth. We are in the process of upgrading.

    ReplyDelete
  25. I want to input some data while executing the code. Please tell me where to input the data.

    Thanks
    Satya

    ReplyDelete
  26. Not able to execute C program,it is showing guest.c : permission denied

    ReplyDelete
  27. Cannot run examples. I get an error on the page:
    ---------------------------
    [admin@www.techbugs.org /]$
    :: OnlineCompiler/guest.c: Permission denied

    [admin@www.techbugs.org /]$
    ---------------------------

    ReplyDelete
  28. Guys you can use botskool online compiler with input feature ..
    botskool.com/online-compiler

    Enjoy..

    ReplyDelete
  29. deaviator,
    We will be hopefully back with our online compiler. Some bad guys keep trying to do bad things with the compiler, because of which the server quota is abused and we have disabled the application. We are working on it, and hopefully it should get back

    ReplyDelete
  30. This comment has been removed by the author.

    ReplyDelete
  31. Aditya, Thanks for the offer, and i would really like to see how it goes but the problems that we face are not of server space. The problems include (a) High CPU Usage and bandwidth usage because of compiling going on (b) Potential security risks. For security risks, we have enabled several things and they are very less, but since you are willing to provide the server, it is important that you understand it. I will give you a call this weekend

    ReplyDelete
  32. #include
    #include

    void main()
    {
    clrscr();
    int x,y,z;
    x=y=z=0;
    char ch1[100],ch2,ch3,ch4,ch5,ch6,ch7,ch8,ch9,ch10,ch11;
    cout<<" Guest Enter Your Name
    ";
    cin>>ch1;
    clrscr();
    cout<<" Welcome "<>ch2;
    if(ch2=='a')
    {
    x=x+10;
    cout<<"Good Job.
    Your score is "<>ch2;
    if(ch2=='c')
    {
    x=x+10;
    cout<<"Good Job.
    Your score is "<>ch2;
    if(ch2=='b')
    {
    x=x+10;
    cout<<"Good Job.
    Your score is "<>ch2;
    if(ch2=='b')
    {
    x=x+10;
    cout<<"
    Your score is "<>ch2;
    if(ch2=='a')
    {
    x=x+10;
    cout<<"
    Your score is "<>ch2;
    if(ch2=='a')
    {
    x=x+10;
    cout<<"
    Your score is "<>ch2;
    if(ch2=='c')
    {
    x=x+10;
    cout<<"
    Your score is "<>ch2;
    if(ch2=='b')
    {
    x=x+10;
    cout<<"
    Your score is "<>ch2;
    if(ch2=='a')
    {
    x=x+10;
    cout<<"
    Your score is "<>ch2;
    if(ch2=='c')
    {
    x=x+10;
    cout<<"
    Your score is "<<x;

    }
    else
    cout<<"Sorry wrong answer.";
    getch();
    clrscr();
    if(x==100)
    cout<<"No cheating...... You have done this earlier also.";
    if(x==90)
    cout<<"You are extremely intelligent
    Your Score is 90";
    if(x==80)
    cout<<"You are intelligent
    Your Score is 80";
    if(50==x||x==70||x==60)
    cout<<"You are average
    Your Score is "<<x<<"
    Better luck next
    time";
    else if(x<=40)
    cout<<"No use........ Not even 5 questions right";
    getch();
    }

    ReplyDelete
  33. algolint is best online website dealing with all kind of online complier and online ide. Code snippets and compile and execute program online can be access and can be deal with no issue and errors free

    ReplyDelete