saving . . . saved Compilation procedure in windows("cmd") has been deleted. Compilation procedure in windows("cmd") has been hidden .
Compilation procedure in windows("cmd")
Title
Question
Respected sir,
We need a complete procedure of compilation of simple c program in windows("cmd").


C-and-Cpp First-C-Program 00-01 min 0-10 sec 20-02-16, 1 p.m. gpmstutorial

Answers:

Hello,
Pls refer to the Installation Sheet given at this link to know how to install and run mingw compiler on Windows OS using "cmd".

http://spoken-tutorial.org/media/videos/43/C-and-Cpp-Installation-Sheet-English.pdf

Tnx and rgds,
Nancy Varkey
20-02-16, 5:10 p.m. nancy


1. Write the program in Notepad++ in some folder in a drive (E.g. Create a folder program in D drive. )
#include<stdio.h>
void main()
{
printf("hello");
}

Give a file name Sample.cand Click Filemenu and saveit

Take command prompt by typing cmd in Run
Then change directory to the place where you saved the file (E.g your file Sample. c is in D:\\program)
Type
D:
cd program
(This will give a prompt D:\\program>)

2. COMPILE THE PROGRAM
Type
gcc Sample.c -o sample
(Here sample.exe will become the name of the output file)
press enter key
This will compile the program
If no error nothing will be shown. Otherwise it will show error details then correct the error and again compile)

/If no error RUN the program
type
sample.exe





15-02-20, 7:02 a.m. renethajb
Type the following for program compilation:

D:\\program>>gcc -o Sample Sample.c

Sample is a .exe file created in the same folder of Sample.c

Type the following to run the .exe program:

D:\\program>>Sample
04-12-21, 7:02 p.m. Rsenthil_1976

Login to add comment


Log-in to answer to this question.