How To Run C language Program on Cygwin By Technical Chetan And Aayush

Опубликовано: 22 Март 2026
на канале: Wawarkar CSC & Programming Center
832
6

After Installing Cygwin with normal configuration. There is shortcut was created on your computer desktop.

Step:-1
Open Cygwin Terminal as shown in this video.

Step2:-
Then create folder of any name wish you want create. Here I creates Chetan folder by typing following command.
mkdir Chetan

Where
1.mkdir is command for creating new folder.
2.Chetan is name of folder.

Step:-3
Then go to Chetan folder by typing following command
cd Chetan
This step shown in video.

Step:-4
Then make program in any drive any save it as. c extension and copy the file in following location.

C:\cygwin64\home\Mukesh\Chetan

Note:-
1.
Here Mukesh is name of my computer user. But according to user name the name of folder changed.

2.
You can also make program in following path
C:\cygwin64\home\Mukesh\Chetan.

Step:-5

After that for Compiling C program in Cygwin type following command.

Syntax
gcc FileName.c

Example:-
gcc Pro1.c

Here
1. gcc is command to run C language program.
2.Pro1.c name of C program file name.

Step:-6

After successfully compiling the program there is a.exe file is generated.

Then go to following path
C:\cygwin64\home\Mukesh\Chetan.
and then open that file.

Note :
1.
a.exe file also store result of current compile file.
2.
Please write getch(); at the end of program.