Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   C Compiler (http://www.go4expert.com/forums/c-compiler-t12055/)

cancer10 12Jul2008 18:10

C Compiler
 
Hi,

Just wondering if Borland C++ Compiler version 5.5 works for C language also?

If not, can u plz refer me with a similar free C compiler?


Thanx

GreenGrass 12Jul2008 18:39

Re: C Compiler
 
This one works for C/C++

Download: http://www.bloodshed.net/devcpp.html

cancer10 12Jul2008 19:35

Re: C Compiler
 
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

GreenGrass 13Jul2008 03:11

Re: C Compiler
 
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;
}

cancer10 13Jul2008 07:50

Re: C Compiler
 
Solved.

I used getch(); and it worked :)

GreenGrass 13Jul2008 12:22

Re: C Compiler
 
Nice to hear mate :)


All times are GMT +5.5. The time now is 12:55.