data-driven-docs

Selft training repo


Project maintained by ggranados Hosted on GitHub Pages — Theme by mattgraham

Procedural Programming


Table of Contents

What’s Procedural Programming

Procedural programming organizes code into reusable procedures or functions that operate on data. It emphasizes the use of procedures to encapsulate behavior and separate it from data.

Examples

The example is a C program that defines a function to calculate the sum of two numbers and prints the result.

#include <stdio.h>

int sum(int a, int b) {
    return a + b;
}

int main() {
    int result = sum(3, 4);
    printf("Result: %d\n", result);
    return 0;
}

Back to top

Languages

The first major procedural programming languages appeared circa 1957–1964, including Fortran, ALGOL, COBOL, PL/I and BASIC. Pascal and C were published circa 1970–1972.

Back to top


Ref.


Get Started