How do compilers work?

A compiler transforms the code into a low-level language that our computer can comprehend in order to run a programme written in a certain language, which is typically high-level.There are many compilers available, but for the purposes of this course, we will instruct you to utilise MinGW because it will meet all of our needs and is also endorsed by Microsoft.

Establishing the compiler

  • View the documentation for C++ at https://code.visualstudio.com.
  • Choose C++ on the sidebar.
  • Pick one of the choices under “GCC through Mingw-w64 on Windows” from the list.
  • Choose the option to install SourceForge.
  • Run the setup programme once the downloading is complete, and then select all of the default options, just as we did when installing Visual Studio Code.

Setting Compiler’s Path

  • Navigate to the directory C. Enter the Program Files directory. Open MinGW-64 next. Fire up MinGW-32. the bin folder follows. Save the path or URL to the bin once you’ve reached it.
  • then visit “This PC’s” properties.
  • “Advanced System Settings” should be chosen.
  • Choose “Environment Variable” from the menu.
  • Change the environment variable to include the copied path.
  • You may now access your IDE and start running C programmes there. Configuration is complete.

Launch VSCode. Here is the most basic print statement we can use to get started.

#include <stdio.h> 
int main()
{
    printf("Hello World\n");
    return 0;
}

Output: Hello World

Shubhajna Rai
Shubhajna Rai

A Civil Engineering Graduate interested to share valuable information with the aspirants.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest updates on your inbox

Be the first to receive the latest updates from Codesdoc by signing up to our email subscription.

    StudentProjects.in