What are the 4 types of Programming Languages?

What-are-the-4-types-of-Programming-Languages.jpg

There are four types of programming languages: Procedural, Functional, Object-Oriented, and Scripting Programming languages. In this blog, we will learn these 4 types of programming languages in detail.

Table of contents

Types of Programming Languages

Here are the following programming languages that are used by developers to develop real-life applications:

1. Procedural Programming Languages

These languages work on the sequence of operations that are performed by the computer. It breaks down the program into smaller, and reusable functions.

  • Examples of these languages are: C, Pascal, Fortran, and BASIC

Let’s have a look at C Language(Procedural language ) code:

Code:

#include <stdio.h>

void greet() {
    printf("Hello, World!\n");

}
int main() {
    greet();
    return 0;
}

Output:

Hello, World!

2. Functional Programming Language

Functional programming languages are designed to express all computations through functions. In these languages, functions are the core building blocks, and programs are constructed by composing and applying them. This approach emphasises immutability, avoids shared state, and often leads to more predictable and maintainable code.

Examples of these languages are: Haskell, Lisp, Scala, and Erlang

Below is the Haskell language code:

Code:

square x = x * x
main = print (square 5)
 Output: 25

3. Object-oriented programming language

Object-oriented languages are language that revolves around Classes and objects. These languages organize code into reusable components called objects. Objects are real-world entities that have their own unique characteristics and behaviours. 

There are six major components of object-oriented programming: 

  • Classes: it is a blueprint for objects. It contains attributes and methods inside its definition.
  • Objects: An object is an instance of a class.
  • Encapsulation:  Encapsulation means hiding the internal details of a class.
  • Abstraction: it shows only the essential details and hides the rest.
  • Inheritance: Inheritance allows a child class to inherit methods from its parent class.
  • Polymorphism: Polymorphism means more than one function can have the same name but perform different actions.

Examples of these languages are: Java C++, Python, C#, Ruby

Here’s the Java Language code:

Code:


class Animal {
void makeSound() {
System.out.println("Some sound...");
}
}
class Dog extends Animal {
void makeSound() {
System.out.println("Bark!");
}
}
public class Main {
public static void main(String[] args) {
Animal myDog = new Dog();
myDog.makeSound();
}
}
Output:
Bark!

4. Scripting Languages

These languages are used to automate tasks and manage dynamic content. These languages are mostly interpreter-based languages for executing tasks easily. These are also used for web development, system administration, and prototyping.

  • Examples of these languages are: JavaScript, Python, PHP, Ruby, Perl, and Bash

Find the Python code below:

Code:

import random

import string

password = ''.join(random.choices(string.ascii_letters + string.digits, k=12))

print("Generated Password:", password)
Output: Generated Password: Wuyi1IIh3NXu

Explanation: The above code generates random passwords each time. Whenever we run this code, it will create a new password.

In today’s rapidly evolving tech landscape, certain programming paradigms are seeing a surge in adoption:

  • Object-oriented languages remain a staple in large-scale software development, but are now often combined with functional approaches for better code quality.
  • Functional programming is growing in popularity, especially in data science, AI, and concurrent systems, due to its support for parallel processing and predictable behaviour.
  • Python, a multi-paradigm language, continues to dominate thanks to its versatility in scripting, data analysis, machine learning, and web development.
  • Scripting and automation skills are increasingly in demand across DevOps and system administration.

Conclusion

So far in this article, we have learned 4 types of programming languages in detail. Procedural, Functional, Object-Oriented, and Scripting Programming languages. If you want to learn more about these languages, you may refer to our language courses: C language course, Java Course, Python Course.

About the Author

Technical Research Analyst - Full Stack Development

Kislay is a Technical Research Analyst and Full Stack Developer with expertise in crafting Mobile applications from inception to deployment. Proficient in Android development, IOS development, HTML, CSS, JavaScript, React, Angular, MySQL, and MongoDB, he’s committed to enhancing user experiences through intuitive websites and advanced mobile applications.

Full Stack Developer Course Banner