Do you want to learn what is the basic of programming languages, then this article is perfect for you.
Computer science is a field of study that deals with solving a variety of problems by using computers. To solve a given problem by using computers, we need to use programming languages.
We all are well known about the importance of language. A language is a system of communication for human. Without using language we (human) can’t talk with each others.
We are using different natural languages like English, Spanish, French, Hindi, Bengali etc to communicate with other people.
But, computer is a machine and do not understand the natural languages normally human beings used to communicate with others.
That is the why, programming languages comes in picture.
Let’s dive in.
What is a programming language?
A computer programming language is a language comprising vocabulary and a set of instructions used to write computer programs which generally given instructions to computer to perform a specific task or get a desired output.
A programming language allow us (human) to communicate with the computer.
A programming language consists of all the syntaxes (i.e. grammar or rules of usage) and semantics meaning that permit human / people to communicate with the computer.
What are the types of programming languages ?
Programming languages are can be categorized into two types 1) Low level language and 2) High level language
Low Level Language
Low level languages are used for systems programming because they provide powerful features such as direct access to memory. Low level language broadly divided into two categories i.e. 1) Machine language and 2) Assembly language.
- Machine language
- Assembly language
High Level Language
High level languages are used for application programming because these are flexible and easy to use.
- Procedural oriented language
- Problem oriented language
- Natural language
What is the basic of programming languages ?
There are many core concepts that are important for all programmers to understand, no matter what programming language they use. The concepts taught apply to all programming languages.
Basic elements of any programming languages are:
Character sets is alphabets of programming languages. Just like other natural languages like English where we using alphabets (i.e. A, B, C, D, ….. Z). Like this, programming languages have some character sets, those are use to write computer program.
Character sets of programming languages are made with combination of letters (A-Z), digits(0-9), special characters and white spaces.
Keywords are the set of words & reserved words used in programming languages that have special meanings to the compiler. Meaning and actions of keywords remains fixed throughout the language.
Every programming languages like C, C++, C#, Java, PHP, Python etc have some set of predefined keywords. List of keywords of most popular languages are:
An operator is a symbol in programming language that tells the compiler or interpreter to perform specific mathematical, relational, logical, increment & decrement operations and to produce final result.
To run any programming language we need several operators i.e. 1) Arithmetic Operator, 2) Relational Operator, 3) Logical Operator, 4) Assignment Operator, 5) Increment & Decrement Operators, 6) Conditional Operators, 7) Bitwise Operator, 8) Special Operator.
In mathematics, we know that a variable is an alphabet or term that represents an unknown number, value, quantity. Data in programming languages are stored in variables.
In programming, a variable is a name given to particular location in the memory of computer and the value stored in a variable can be altered during program execution.
Decision Making Statements
Decision making statement is one of the important concepts in programming. Example of decision making statements are 1) If-else statement, 2) Switch statement
Example of Looping statements are 1) For loop, 2) While loop, 3) Do-while loop
Arrays are using to declare and define multiple variables of the same type with one identifier. An array is a collection of elements of the same type that are referenced by a common name.
Main advantage of declaration of array is that by using a simple expression we can define large number of variables.
The square brackets [ ] are used to create the array in programming.
Functions provide an easy means to organize the programs into smaller modules and use them again without rewriting all the code.
A function is the collection of expressions that can be called by repeated number of times. A program can declare and call a function as many times as necessary.
Function is a self contained block of code/ statements that perform a coherent task of some kind.
Classes and Objects
The term exception denotes an exceptional event. It can be defined as an abnormal event that occurs during program execution and disrupts the normal flow of instruction.
A tree is a nonlinear hierarchical data structure like a tree that consists of nodes connected by edges.
A tree consists of a finite set of elements, called nodes and a finite set of directed lines called branches that connect the nodes.
A graph is a kind of data structure that consists of a set of nodes and a set of edges that establish connections between the nodes.
Note: List of elements of programming languages are not end here. Every programming language have different concepts and own elements. However, if you understand the basic elements of programming language, it may be apply for all language.
How to learn computer programming ?
As we are living in the digital era, a number of ways and opportunities are available for us to learn computer programming.
This is article is under construction, please visit again to read the complete article.
Thanks for reading this article.