1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

C Compiler

Discussion in 'C' started by cancer10, Jul 12, 2008.

  1. cancer10

    cancer10 New Member

    Joined:
    Jul 12, 2008
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Webmaster
    Location:
    India
  2. GreenGrass

    GreenGrass New Member

    Joined:
    Jul 5, 2008
    Messages:
    123
    Likes Received:
    8
    Trophy Points:
    0
    Location:
    Norway
  3. cancer10

    cancer10 New Member

    Joined:
    Jul 12, 2008
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Webmaster
    Location:
    India
    ok I downloaded Bloodsheed Dev C++

    I am trying to run this code

    Code:
    #include <stdio.h>
    
    int main()
    {
        printf("\n");
        printf("Hello World");
        printf("\n");
    }
    

    It compiles ok, and a DOS screen comes for a few milliseconds and disappears.

    Why is this hapenning? And How/Where do I see the output?

    Sorry, I am new to C.


    Thanx
     
  4. GreenGrass

    GreenGrass New Member

    Joined:
    Jul 5, 2008
    Messages:
    123
    Likes Received:
    8
    Trophy Points:
    0
    Location:
    Norway
    You need to put a "PAUSE" so you can see like:

    i am not sure how it works in C but in C++ it is like this

    system("PAUSE >nul");
    return EXIT_SUCCESS;
    }
     
  5. cancer10

    cancer10 New Member

    Joined:
    Jul 12, 2008
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Webmaster
    Location:
    India
    Solved.

    I used getch(); and it worked :)
     
  6. GreenGrass

    GreenGrass New Member

    Joined:
    Jul 5, 2008
    Messages:
    123
    Likes Received:
    8
    Trophy Points:
    0
    Location:
    Norway
    Nice to hear mate :)
     

Share This Page