To run c programs on windows we have to follow following steps:
1.Visit google
2.Search tdm gcc compiler (see image)
then select tdm-gcc:news option
4.Run downloaded exe file.
5.Select following options:
create,
32/64 as per your OS,
next,
installation directory path-next,
next,
install,
next,
finish.
here,installed successfully.........then
9.open command promt
10.Type:
start notepad hello.c
start notepad hello.c
11.yes
12.type code:
#include<stdio.h>
void main()
{
printf("hello world");
}
13.save code
14. open command prompt and type :
gcc -o hello hello.c this will compile then
hello this will run code.
Output will be :
hello world
Comments
Post a Comment