Download and install Compiler software (CodeBlocks).
http://www.codeblocks.org/downloads/binaries/Download your version compatible with your system. Notice ‘mingw’ word in the file name. Because ‘mingw’ is the compiler included in CodeBlocks software.
Ex: codeblocks-20.03mingw-setup.exe
Open New file ( File >> New >> Empty file )
Save the file ‘welcome.c’ or ‘welcome.cpp’
Write the sample code given below:
C Program File Name: welcome.c
#include<stdio.h>
void main()
{
printf("Welcome to C Programming!");
}
C++ Program File Name: welcome.cpp
#include<iostream>
using namespace std;
int main()
{
cout << "Welcome to C++ Programming!";
return 0;
}
Compile/Build the file ( Build Menu >> Build ) or keyboard Shortcut ‘Ctrl+F9’
Run/Execute the file (Build Menu >> Run ) or keyboard Shortcut ‘Ctrl + Shift + F9’