Introduction to Programming Languages (original) (raw)

Last Updated : 15 Oct, 2025

Programming languages are the foundation of software development, allowing developers to create applications, websites, and systems through computer-understandable instructions.

Types of Programming Languages

Programming languages are classified based on their level of abstraction:

Key Terms in Programming Languages

Here are some widely used programming languages and their typical applications:

Each language has unique strengths, making it suitable for specific domains

Here the basic code for addition of two numbers are given in some popular languages (like C, C++,Java, Python, C#, JavaScript etc.).

C++ `

// C++ program for sum of 2 numbers #include using namespace std;

int main() { int a, b, sum; a = 10; b = 15; sum = a + b; cout << "Sum of " << a << " and " << b << " is: " << sum; // perform addition operation return 0; }

C

// C program for sum of 2 numbers #include <stdio.h>

int main() { int a, b, sum; a = 10; b = 15; sum = a + b; printf("Sum of %d and %d is: %d", a, b, sum); // perform addition operation return 0; }

Java

// Java program for sum of 2 numbers import java.io.*;

class GFG { public static void main(String[] args) { int a, b, sum; a = 10; b = 15; sum = a + b; System.out.println( "Sum of " + a + " and " + b + " is: " + sum); // perform addition operation } }

Python

Python program for sum of 2 numbers

a = 10 b = 15 add = a + b # perform addition operation print(f"Sum of {a} and {b} is: {add} ")

C#

// C# program for sum of 2 numbers using System;

class GFG {

public static void Main()
{
    int a, b, sum;
    a = 10;
    b = 15;
    sum = a + b;
    Console.Write("Sum of " + a + " and " + b + " is: "
                  + sum); // perform addition operation
}

}

` JavaScript ``

let a = 10; let b = 15; let add = a + b; // perform addition operation console.log(Sum of <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>a</mi><mi>a</mi><mi>n</mi><mi>d</mi></mrow><annotation encoding="application/x-tex">{a} and </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord"><span class="mord mathnormal">a</span></span><span class="mord mathnormal">an</span><span class="mord mathnormal">d</span></span></span></span>{b} is: ${add});

`` PHP `

sum=sum = sum=a+$b; //perform addition operation echo "Sum of aanda and aandb is: $sum"; //This code is contributed by Susobhan Akhuli ?>

Scala

// Scala program for sum of 2 numbers object Main { def main(args: Array[String]) { val a = 10; val b = 15; val sum = a + b; //perform addition operation println("Sum of " + a + " and " + b + " is: " + sum); } }

Cobol

*> Cobol program for sum of 2 numbers IDENTIFICATION DIVISION. PROGRAM-ID. SUMOFTWONUMBERS.

DATA DIVISION. WORKING-STORAGE SECTION. 77 B PIC 99. 77 A PIC 99. 77 SU PIC 99. PROCEDURE DIVISION. SET A TO 10. SET B TO 15. ADD A B GIVING SU. DISPLAY "Sum of " A " and " B " is: "SU. STOP RUN.

Dart

// Dart program for sum of 2 numbers void main() { var a = 10; var b = 15; var sum = a+b; // perform addition operation print("Sum of aand{a} and aand{b} is: ${sum}"); }

Go

// Go program for sum of 2 numbers package main

import "fmt"

// Main function func main() { a:= 10 b:= 15 su:= a + b // perform addition operation fmt.Printf("Sum of %d and %d is: %d", a, b, su) }

Julia

Julia program for sum of 2 numbers

a = 10 b = 15 su = a + b # perform addition operation println("Sum of ", a, " and ", b, " is: ", su)

`

Output

Sum of 10 and 15 is: 25

**Tips for learning new programming language

By following these steps, you’ll learn faster and build a solid foundation in any new programming language.