Windows 10 Programming Tutorial from Experts

Windows 10 Programming Tutorial

Windows 10 is a widely used operating system that can handle a wide range of jobs, including coding. However, there is still a lot of debate over whether Windows 10 is the best choice for people who are interested in software development. 

We think that Windows 10 is great for coding because it supports various tools and languages. It also features significant improvements over the previous versions of Windows and offers a lot of customization and compatibility choices. Moreover, there are numerous benefits to coding on Windows 10 as opposed to Mac or Linux.

This article will help you with a programming tutorial in Windows 10, so brace yourself!

If you need more help with computer programming, get in touch with assignment helpers from CWAssignments.com to have your projects done online.

Running Your First Program On Windows 

In essence, computers can’t understand windows 10 programming tutorial languages. This demands the use of a compiler that translates the written program into a language that the computer can understand. The compiler, after translating the program, converts the code into an executable file, which is something you can run and do anything with. First, we’ll install a compiler to get started. 

Things You Will Need 

  • You 
  • A computer with Windows 10 installed 

That’s all you need to start writing your code! Let’s download the compiler now that interprets your code. 

Installing The GCC 

Go on to: http://gcc.gnu.org/install/

Here, you will find lengthy installation details. If you just want to download it, you can go to: http://www.netgull.com/gcc/releases/gcc-4.8.1/

There you will find a file named “tar.gz”. This is a compressed file with a different compression than “.zip”. You will have to decompress the file with something like WinZip and follow the installation details mentioned on the website. 

Once you’ve installed the compiler and verified it (coming in the next step), follow the upcoming instructions. 

Open Command Prompt 

There are two methods to go about this. 

1st Method With Vista or Windows 7 

Click on Start Menu. Type ‘cmd’ and click on Command Prompt. 

This should open up a black window with white text that looks very old and ominous. 

In case your start menu is different, follow the method given below. 

2nd Method Using Task Manager 

Open your task manager by pressing either CTRL + ALT + DELETE or CTRL + SHIFT + ESC (If there’s a button that says “Task Manager”, click it). Look at the top of the window that opens up and look for “Run” and press it. If there’s no button, click

File>Run. A new window would appear with just a text field. Type in “cmd” without the quotes and Command Prompt will open.

Verifying The GCC 

Log on to the command prompt window. To verify if GCC is installed or not, simply type “GCC” without the quotes and press enter. If the message:

‘gcc’ is not recognized as an internal or external command, operable program or batch file

appears, that means that the GNU C Compiler didn’t get installed properly, and you will have to re-install the GCC or troubleshoot what went wrong. 

If the message:

gcc: fatal error: no input files

compilation terminated.

appears, it means that the compiler is installed, and we can move forward. 

Open A New Text File 

Now you need to open a new text document for writing your program. The easiest method to do this is by right-clicking the desktop and heading towards New>Text Document. This will open an empty text document on the desktop. 

You can do this another way by simply opening the notepad. 

Simply go to: 

Start>All Programs>Accessories>Notepad

Coding 

In the new file, type or copy this text: 

#include <stdio.h>

void main(){

printf(“Hello World!”);

}

Once you’ve done that, click File>Save As. This step is crucial. You can call the file whatever you like, but always set the type to “all files” and end the program with the extension “.c”. This is so the compiler knows what the file is. When the program gets compiled and is ready to run, it will print the sentence “Hello World!” in the window of the command prompt. When you save the source code file, follow the next step. 

Compiling 

In case you don’t mind what your code is named, simply type:

gcc HelloWorld.c

in the command prompt window. In case of any errors, open the code file again in the notepad and see if everything was copied or typed correctly. You also want to check if the file was saved correctly or not (with “.c” extension). When the code is compiled this way, it gets “a.exe” by default.

Naming the code involves a bit more than just the previous step. You need to type:

gcc -c HelloWorld.c

The compiler will form an object file with a “.o” extension in it. This step is important if you have codes with several files in them.  Next type:

gcc -o HelloWorld HelloWorld.o

The “HelloWorld” part is simply what the program is going to be called, while everything coming after it will be the constituent files. Name your file whatever you like without using spaces. 

Once you’ve completed this step, it means that your code has been compiled, and you can go to the next step. 

Run Your Code 

Now comes the time to run the program for the first time!

The program you’ve run will print out the sentence “Hello World” in the window of the command prompt. If you used the last step and compiled the program with gcc HelloWorld.c all you have to do is type the letter “a”. If you had named your program, simply type the name of your file. 

A Final Word 

This article gave details about Windows 10 and running a program on it. Windows 10 is probably one of the most famous OS to run codes. If you’re a beginner, you’ll like this programming tutorial in Windows 10 for how easy it is. 

Simply follow the steps in this tutorial to write and run your program and get started on your coding journey. 

Your-Windows-License-Will-Expire-Soon-On-Windows-10
Windows

Your Windows License Will Expire Soon On Windows 10 [Easy Hacks]

Nowadays, it has become easier to install Windows 10 by buying the official OS. Also, you can get the update at ZERO cost as you can download the firmware from Microsoft Store or from Microsoft’s server on the device by using the product key.  But, while installing Windows 10, if you encounter the error notification […]

Read More
Technology Windows

How to Remove Digital TV Tuner Device Registration Application

The digital TV tuner device registration application is a part of the Windows Media Center which helps you to watch cable TV channels. However, it can sometimes become glitched and use up computer resources making the whole system slow. This can be caused due to a corrupted ‘ehPrivJob.exe’ process, DRM folder, etc. Other times, the […]

Read More
Windows

Learn How To Fix Error 0x8007045d In The Most Effective Way

Error 0x8007045d is a very common I/Q error frequently faced by Windows users. Normally such I/O errors trigger when the users try to transfer their essential files from one particular storage medium to another storage medium. The transfer is done either by means of burning a disc or by means of launching a storage device. […]

Read More