C Compiler

cancer10's Avatar, Join Date: Jul 2008
Go4Expert Member
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
0
GreenGrass's Avatar, Join Date: Jul 2008
Ambitious contributor
This one works for C/C++

Download: http://www.bloodshed.net/devcpp.html
0
cancer10's Avatar, Join Date: Jul 2008
Go4Expert Member
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
0
GreenGrass's Avatar, Join Date: Jul 2008
Ambitious contributor
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;
}
0
cancer10's Avatar, Join Date: Jul 2008
Go4Expert Member
Solved.

I used getch(); and it worked
0
GreenGrass's Avatar, Join Date: Jul 2008
Ambitious contributor
Nice to hear mate