GUIDE9 MIN READUPDATED Jun 4, 2026

HOW TO WRITE A PROGRAMMING LAB REPORT

The complete structure, formatting rules, and section-by-section playbook for writing a programming lab report that gets full marks.

T

The Assignment Bot Team

Jun 4, 2026 · Editorial

A programming lab report is the formal write-up you submit after completing a coding practical. Most universities require a fixed structure: Aim, Theory, Procedure, Code, Output, and Conclusion. Knowing the structure is half the battle. The other half is formatting it cleanly so your evaluator can read it without friction.

This guide walks through every section, what to put in it, and the formatting rules that separate a full-marks submission from a sloppy one. Whether you write C++, Python, Java, or SQL practicals, the structure is the same.

The Standard Lab Report Structure

Most Indian university lab manuals and international CS curricula follow the same six-section structure. Your evaluator is trained to look for these sections in this order:

  1. 1Aim — one or two sentences stating what the program does
  2. 2Theory — the concept behind the program, with definitions and formulas
  3. 3Algorithm / Procedure — step-by-step logic in plain English or pseudocode
  4. 4Code — the full source listing, formatted in a monospaced font
  5. 5Output — a screenshot of the program running, with the actual console output
  6. 6Conclusion — what you learned, in 2-3 sentences

Pro tip

If your lab manual names sections differently (e.g. "Objective" instead of "Aim", or "Result" instead of "Output"), follow the manual exactly. Evaluators grade against a rubric, and missing their exact section names costs marks even if the content is correct.

Section 1: Aim

The Aim is a one or two sentence statement of what your program does. Not what you learned, not the theory, not the steps. Just the task. Examples:

  • Aim: To write a C++ program that implements a stack using arrays and demonstrates push, pop, and display operations.
  • Aim: To write a SQL query that retrieves the names of all employees in the Sales department earning more than 50,000.
  • Aim: To implement the FIFO page replacement algorithm in C and compute the number of page faults.

Keep it under 30 words. Start with "To write a program that..." or "To implement...". Avoid adjectives ("efficient", "robust") — those belong in the Conclusion.

Section 2: Theory

Theory is where you explain the concept behind the program. For a sorting algorithm, describe how it works. For a data structure, define it. For a database query, explain the operators used. The goal is to show the evaluator you understand why the code works, not just that it runs.

A solid Theory section is 150-300 words and includes:

  • Definition of the key concept (1-2 sentences)
  • How the algorithm or technique works (stepwise or with a small example)
  • Time and space complexity, if relevant
  • Any formula, syntax rule, or notation the program relies on

Section 3: Algorithm or Procedure

The Algorithm is a numbered list of steps in plain English. It should be detailed enough that someone who has not seen the code can reimplement it. Avoid copying code into the algorithm — keep it in plain English or pseudocode.

  1. 1Step 1: Start
  2. 2Step 2: Declare variables n, i, arr[100]
  3. 3Step 3: Read n from the user
  4. 4Step 4: For i = 0 to n-1, read arr[i]
  5. 5Step 5: For i = 0 to n-1, print arr[i]
  6. 6Step 6: Stop

Section 4: Code

The Code section contains the full source listing. Three rules:

  • Use a monospaced font (Consolas, Courier New, or JetBrains Mono). Never paste code as an image.
  • Indent consistently — 2 or 4 spaces, not tabs mixed with spaces.
  • Add brief comments at the top of major blocks ("// function to sort array in place").
cppCODE
#include <iostream>
using namespace std;

int main() {
    int n;
    cout << "Enter number of elements: ";
    cin >> n;

    int arr[100];
    for (int i = 0; i < n; i++) {
        cin >> arr[i];
    }

    cout << "You entered: ";
    for (int i = 0; i < n; i++) {
        cout << arr[i] << " ";
    }
    return 0;
}

Section 5: Output

The Output section is a screenshot of your terminal or IDE showing the program actually running. Two non-negotiable rules:

  1. 1The screenshot must show the program running, not the source code. Crop out the editor.
  2. 2If your program takes input, show both the input you typed and the output produced. Evaluators want to see the cause-and-effect.
!

Common mistake

Submitting a screenshot of the source code (VS Code, PyCharm, etc.) instead of the terminal output. The Output section proves the program actually ran. A code screenshot proves nothing.

Section 6: Conclusion

The Conclusion is 2-3 sentences summarizing what you learned. Be specific. "I learned about stacks" is weak. "I learned how LIFO data structures work using arrays, including the role of the top pointer in push and pop operations" is strong.

Formatting Rules That Get Full Marks

  • Use a single consistent font (Times New Roman 12pt for text, Consolas 10pt for code is the safe default).
  • Number every page. Most universities require a footer with page numbers.
  • Include a header on every page with your name, roll number, and the experiment number.
  • Leave 1-inch margins on all sides.
  • Bold section headings (Aim, Theory, etc.) and use 14pt or larger.

The Shortcut Most Students Don't Know

If you already have a working program and a working screenshot, the only remaining work is the writing — Aim, Theory, Algorithm, Conclusion, and the formatting. That writing takes 60-90 minutes per report when done by hand. A tool like Assignment Bot generates the same structure with all the formatting in around 10 minutes, from a screenshot of your brief.

Skip the formatting

Upload your assignment brief. Get a complete, formatted DOCX with Aim, Theory, Code, Output, and Conclusion in 10 minutes. First assignment is free.

ABOUT THE AUTHOR

The Assignment Bot TeamWe test, write, and ship practical guides for CS students who want to spend less time formatting and more time learning.

READY TO SHIP YOUR LAB REPORT?

Skip the formatting. Upload your brief, get a complete, submit-ready DOCX in 10 minutes. First assignment is free.