Search Result
Details here...

Introduction to Programming

Next

Introduction to C


Programming means writing some piece of code, to solve a problem using the programming languages. The program will instruct the computer on what and how to do.

Simply,

Programming is a way to have a talk with the computer, in a language that is the bridge between the person and the later.

Programming Language

Programming languages are the aforementioned bridge-language which, we will use, as a medium to communicate with the computer.

Examples; the C programming language, C++, Python, Java, JavaScript, etc.

Here, we'll generally be talking about the High Level Languages!

Did you know?

High-Level Languages are the programming languages that resemble natural languages and mathematical symbols and operations to communicate to a computer, in a way that is user-friendly and isn't much dependent on the machine or the computer.

How to programme?

To programme, we use some piece of keywords, operators, logics, and more in some way. This is to instruct a computer to do our desired work.

We use some special languages that are close to our natural language to programme a computer.

We use the aforementioned languages, and write some specific code with the help of a text editor, like, notepad, sublime text, etc., save the code, and run some processes that include either interpretation or compilation or even conversion to an intermediate language.

What is a text-editor?

A text editor is a software to write and edit text. We use some popular text-editors like, notepad, sublime text, etc. to write and edit code.

The text editor with greater functionality to write code is generally called an IDE, or Integrated Development Environment. The IDE can also have some other features like, compiling, debugging, etc.

Some of Popular IDE

Visual Studio Code, Sublime Text, Atom, Brackets, etc..

Interpreter and Compiler

Before learning about the languages, we need to understand the concept of Interpreter and Compiler.

We do not just write some code, but we need to either compile or interpret it and then run it. Compilation or interpretation is the process of converting the source code to a machine-level language(object code). It means, converting the code to a language that the computer can understand.

Did you know?

The computer understands only binary, i.e; 0 and 1.

The interpreter and compiler are the computer program that convert a code written generally in high level languages to a language that is understood by the computer, a machine code.

The difference between the two is that the interpreter converts each line of code to a machine code line by line, whereas the compiler converts the entire code to a machine code, at once or in parts, converting to some intermediate language.

Remember

Compiler and Interpreter are not the same thing.

Now, how to compile or interpret a code?

Generally, a compiler or an interpreter comes with the language itself. For example, C++ comes with a compiler, which is called g++, and an interpreter, which is called gdb. To compile or to interpret a code, we use some set of instructions to call the compiler or interpreter, asHey compiler/interpreter, compile/interpret file code.cpp For example, if we want to compile a C++ code, saved as code.cpp we use the commandg++ code.cppto compile the code. The result will be a file called a.exe, which is the output of the code. The output of the code is the result of the code. Then we use the command ./a.exe to run the code.

Note

This is represented generally, and we will talk more and on detail on the course.

By darpan.kattel
Next

Introduction to C