Thursday, July 25, 2024
HomePROGRAMMINGHow to run C program in Command Prompt?

How to run C program in Command Prompt?

How to start programming?

This is the basic doubt gets into every programming starters mind. So, we are here to help you clear your doubt on programming making sure you to have a confidence on it.

New to programming?

Programming beginners might feel difficult to write programs in compilers and execute them is another big task. It takes much time to learn coding at starting stage and to learn it within less time needs a lot of hardwork. there are n number of programming languages to learn, but choosing a better one is very important. I suggest to start with c programming which is easy to understand and good for starters as it not contains very tuff code. Learning c program helps you in implementing techniques in other languages.

Tips to execute C program

If you are new to c programming here is a good technique to execute them  easily in command prompt.

How to execute  C program in command prompt

Executing C program in command prompt works well in any type of window Operating sytem xp,7,8,8.1,10. By using command prompt for people who are good with notepad it becomes easy to execute the code. you just need to follow the below steps mentioned.You need to download TDM- gcc compiler.

Download it from the below link

http://tdm-gcc.tdragon.net/download

Step1:After downloading the compiler install it in your pc.

Step2: Open notepad, type the code and save it with .c extension.

Step3:then open cmd as an administrator and give following commands.

step4:give the path of directory where the .c file is saved.

c:\turboc\bin\

then

gcc hello.c

the above command takes the program you mentioned and compiles it. It prints the errors in the code or display simple > for execution command.

hello

This command executes the program succesfully and prints the output on the prompt.

This method clears the doubt of how to start programming? it will work 100% sure at every time. I hope this method helps you in executing the programming in easy manner.

Rana
Ranahttps://ranajayant.com/
Rana Jayant is a Tech Enthusiast, avid reader, and loves to talk business. TECH10MENT was his 1st professional tech magazine started in 2015. His professional blogging experience serves thousands of visitors every day on the food, travel, and other tech sites.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments