Professional Documents
Culture Documents
How To Compile C File With Notepad
How To Compile C File With Notepad
Newsletters
Though you can write "C" code in Notepad, you must have a C compiler, such as the compiler
included with the Microsoft Visual Studio development suite, to compile the code. To write a C
code file in Notepad, type your C code into a blank page in the text editor, and then save the file
with a ".c" file extension if the file consists of a C code page, or the ".h" file extension if the file
consists of header code.
1
Right-click on the desktop and click "New." Click the "Text Document" option to create a new
Notepad document with the file name of "Untitled.txt." Double-click on the text file to open in
Notepad.
2
Type your C code into the blank Notepad page. Try the sample code to display a message
once the program is compiled.
int main()
https://smallbusiness.chron.com/compile-c-notepad-26714.html 1/6
7/9/2021 How to Compile C With Notepad
return 0;
3
Click the "File" option and then click "Save" to save the file.
4
Type the file name, along with the ".c" file extension in quotes, such as "filename.c." The
quotes force the extension to be named ".c" instead of the default ".txt." Click "Yes" to confirm
the file extension change.
1
Click the Windows "Start" button, and then click "All Programs."
2
Click the "Microsoft Visual Studio 2010" option, and then click "Visual Studio Tools."
3
Click the "Visual Studio 2010 Command Prompt" link to open the Visual Studio command
prompt.
4
Type "cl filename.c" (without quotes) and press the "Enter" key to compile the code page. The
C file is compiled into an executable (EXE) file named "filename.exe."
5
Double-click in the "filename.exe" file to run the compiled program.
R E L ATED ARTI C L E S
https://smallbusiness.chron.com/compile-c-notepad-26714.html 2/6
7/9/2021 How to Compile C With Notepad
Are You From Iraq? Project Management Jobs May Pay More Than You
Think
Online Project Management Courses | Search ads
Learning a new language this year? - This app gets you speaking in
just 3 weeks
Babbel
Finding a Job in the USA from Iraq Might be Easier Than You Think
Jobs in the USA | Search Ads
Al Mada'in: Online Jobs in the USA May Pay More Than You Think
Online Jobs | Search Ads
https://smallbusiness.chron.com/compile-c-notepad-26714.html 3/6
7/9/2021 How to Compile C With Notepad
Netbeans gives programmers and Web designers the ability to create Java and JSP servlets,
which run customized code in a user's browser. Servlets are mainly used as widgets on
websites that run advanced applications not available in simple HTML or JavaScript. To
execute a servlet in Netbeans, you use the debugger to run the scripts and test for any bugs in
the code.
1
Open the Netbeans software on your computer. Open the Java servlet project in Netbeans to
view all of the source code files.
2
Double-click on the source code file that you want to run, such as the "starter" file that begins
the execution of your code. Typically, this file is "main.java."
3
Right-click the project name in the navigation panel on the left of the Netbeans window and
click "Run." The code compiles and runs in the Netbeans debugger.
R E L ATED ARTI C L E S
https://smallbusiness.chron.com/compile-c-notepad-26714.html 4/6
7/9/2021 How to Compile C With Notepad
TOP
https://smallbusiness.chron.com/compile-c-notepad-26714.html 5/6
7/9/2021 How to Compile C With Notepad
ABOUT
Terms of Use
CONTACT
Customer Service
Newsroom Contacts
Houston Chronicle
CONNECT
Email Newsletter
© 2021 Hearst
https://smallbusiness.chron.com/compile-c-notepad-26714.html 6/6