Requires C/C++ basics: pointers/memory, data structures, algorithms, modern C++ STL/templates, smart pointers, debugging and a project.
What you will cover
Requires C/C++ basics: pointers/memory
data structures
algorithms
modern C++ STL/templates
smart pointers
debugging
a project
Topic list from the institute's programme record.
Certification
Certificate terms for this programme are confirmed by the institute at admission. Any ADIVAS course-completion certificate is an institute certificate; it is not a university degree, an externally accredited qualification or a vendor certification (such as AWS or Microsoft) unless the institute states so in writing.
Curriculum 0.1 · Draft: written for ADIVAS and awaiting academic review and approval. Topics and weeks may change before your batch starts.
Your skill trail
You move through 5 stations. Each week builds one skill you can show, not just a topic you have heard.
1
Memory and pointers
Understand how memory is laid out and manage it safely.
Week 1 Pointers and the memory model
Week 2 Dynamic memory and memory safety
2
Data structures
Implement linked lists, stacks, queues and trees.
Week 3 Linked lists
Week 4 Stacks, queues and trees
3
Algorithms
Search and sort efficiently and reason about complexity.
Week 5 Searching, sorting and complexity
4
Modern C++
Use the STL, templates, smart pointers and RAII.
Week 6 Modern C++: STL and templates
Week 7 Smart pointers and RAII
5
Debugging and project
Debug crashes systematically and present the project.
Week 8 Debugging, profiling and project demo
★
Contact Directory with Linked List, BST and STL Comparison
Your project, reviewed by a trainer.
The ADIVAS mastery ladder: how each skill is recognised
Explored You have seen the idea and tried a first example.
Practising You can do it with hints and keep improving.
Proficient You complete the weekly practical task correctly on your own.
Proven You apply it in a project reviewed by your trainer.
Skill-level tracking is being added to the learner workspace. Your trainer already reviews weekly practical work.
What you will be able to do
Explain the stack, heap and pointer arithmetic and draw a memory diagram of a program.
Allocate and release dynamic memory safely and find memory errors with sanitizers.
Implement linked lists, stacks, queues and a binary search tree.
Compare searching and sorting algorithms using Big-O reasoning and measured timings.
Use STL containers, algorithms and templates appropriately.
Apply smart pointers and RAII to write leak-free C++.
Debug crashes with gdb and sanitizers and deliver a tested project.
Who it suits
School Strong Class 11-12 students who already write basic C or C++ programs and want to understand memory and data structures.
College College students preparing for data-structure, operating-system and placement-style coding courses.
Professional Working developers who need to strengthen C/C++ memory and data-structure skills.
Prerequisites: Completed C & C++ Foundation or equivalent: variables, loops, functions, arrays and basic pointers. Tools: GCC or Clang compiler (MinGW-w64 on Windows), Visual Studio Code or Code::Blocks, GDB debugger, Valgrind or AddressSanitizer (Linux, or WSL on Windows), Git, A C++17 or later compiler.
Weekly plan
Memory and pointers Weeks 1–2
Week 1: Pointers and the memory model
Theory
Stack, heap and static memory
Pointer arithmetic and pointers to pointers
const with pointers; function pointers
Reading memory diagrams
Lab
Print addresses and sizeof of variables, arrays and struct members, then draw the memory layout of a small program and verify it with a debugger or printed addresses.
Homework
Write a function pointer table for add, subtract and multiply and call it in a loop.
Deliverable
Memory diagram with printed address evidence.
Weekly checkpoint
Predict output of pointer arithmetic on an int array; match memory regions to examples.
You will be able to
Explain the stack, heap and pointer arithmetic and draw a memory diagram of a program.
Week 2: Dynamic memory and memory safety
Theory
malloc, calloc, realloc and free
Leaks, dangling pointers and double free
new and delete in C++
AddressSanitizer and Valgrind
Lab
Build a growable integer array, then deliberately introduce a leak, a use-after-free and an overflow and find each with AddressSanitizer or Valgrind.
Homework
Write a checklist of ten memory-safety rules from your lab findings.
Deliverable
dynarray.c plus sanitizer reports for each seeded bug.
Weekly checkpoint
Spot memory errors in code snippets; choose the correct fix.
You will be able to
Allocate and release dynamic memory safely and find memory errors with sanitizers.
Data structures Weeks 3–4
Week 3: Linked lists
Theory
Nodes, head pointer and traversal
Insert at head, tail and middle
Deleting and reversing a list
Testing empty, one-node and many-node cases
Lab
Implement a singly linked contact list with add, find, delete and reverse; write tests for the three list sizes.
Homework
Implement a doubly linked list insert and compare it with the singly linked version.
Deliverable
contacts list with a test log.
Weekly checkpoint
Order pointer updates for insert; trace a delete on paper.
You will be able to
Implement linked lists, stacks, queues and a binary search tree.
Week 4: Stacks, queues and trees
Theory
Stack and queue with arrays and with lists
Bracket matching with a stack
Binary search tree: insert, search and in-order traversal
Recursion on trees
Lab
Implement a stack to check balanced brackets in expressions and build a BST of roll numbers with in-order printing.
Homework
Draw the BST created by inserting 50, 30, 70, 20, 40 and show its in-order output.
Deliverable
bracket checker and BST program.
Weekly checkpoint
Trace BST insertion; choose between stack and queue for a scenario.
You will be able to
Implement linked lists, stacks, queues and a binary search tree.
Algorithms Weeks 5
Week 5: Searching, sorting and complexity
Theory
Big-O: O(1), O(log n), O(n), O(n^2)
Binary search and its precondition
Insertion sort, merge sort and quicksort ideas
Measuring running time
Lab
Time linear and binary search and two sorting algorithms on 10,000 and 100,000 random numbers and record the results in a table.
Homework
Explain why binary search fails on unsorted data using an example.
Deliverable
Timing table with a one-paragraph conclusion.
Weekly checkpoint
Match algorithms to complexities; predict which is faster for large n.
You will be able to
Compare searching and sorting algorithms using Big-O reasoning and measured timings.
Modern C++ Weeks 6–7
Week 6: Modern C++: STL and templates
Theory
vector, map, unordered_map and set
STL algorithms and lambdas
Function and class templates
Choosing the right container
Lab
Rewrite a word-frequency counter with std::unordered_map and sort the result with std::sort and a lambda; create a template class Stack<T>.
Homework
Compare the vector, list and deque for inserting at the front and explain the results.
Deliverable
wordfreq.cpp and a templated Stack<T>.
Weekly checkpoint
Read a template function and predict output; select a container for a scenario.
You will be able to
Use STL containers, algorithms and templates appropriately.
Week 7: Smart pointers and RAII
Theory
unique_ptr, shared_ptr and weak_ptr
RAII and the rule of zero
Move semantics basics
Exceptions and resource safety
Lab
Refactor the raw-pointer contact list to use unique_ptr nodes and write a small RAII class that closes a file in its destructor.
Homework
List three bugs that smart pointers prevent and one situation where shared_ptr is a poor choice.
Deliverable
Refactored list with a clean sanitizer run.
Weekly checkpoint
Explain why a unique_ptr copy fails; choose ownership types for scenarios.
You will be able to
Apply smart pointers and RAII to write leak-free C++.
Debugging and project Weeks 8
Week 8: Debugging, profiling and project demo
Theory
gdb: breakpoints, backtrace and watch
Sanitizers and core dumps
Regression tests and assert
Code review checklist
Lab
Debug a crashing program with gdb and AddressSanitizer, write a regression test, then demo your contact directory project with timings.
Homework
Write a review of a classmate's code using the checklist.
Deliverable
Debug report, final project and review notes.
Weekly checkpoint
Debugging scenario questions and a project viva.
You will be able to
Debug crashes with gdb and sanitizers and deliver a tested project.
Sample lessons
Week 2
Dynamic memory and leak-free code
Local variables disappear when a function ends, but sometimes the size of data is known only at run time, such as the number of students typed by the user. malloc asks the system for a block on the heap and returns its address. You must release it with free exactly once. Forgetting free leaks memory; using it after free or freeing twice causes undefined behaviour. Tools such as AddressSanitizer and Valgrind find these errors.
1malloc requests a block
2Check for NULL
3Use the block
4free returns it
5Set pointer to NULL
Step by step
Read n from the user and allocate int *marks = malloc(n * sizeof(int)).
Check that marks is not NULL before using it.
Fill and print the values using marks[i].
Call free(marks) and set marks = NULL.
Compile with -fsanitize=address -g and run to confirm there are no errors or leaks.
In real life
Renting a hall for a function: you book the size you need, use it and must hand it back. If nobody returns the keys, the hall stays blocked for everyone.
Worked example
Problem. You allocate int *a = malloc(10 * sizeof(int)); then write a[10] = 1;. What is wrong?
Solution. The valid indexes are 0 to 9, so a[10] writes outside the block (heap buffer overflow). Fix the index or allocate 11 ints; AddressSanitizer reports this exactly.
Common mistakes
Not checking malloc for NULL.
Calling free twice on the same pointer.
Losing the only pointer to a block before freeing it, which leaks it.
Try it yourself
Write a program that allocates an array for n marks, finds the average and frees the memory.
Use realloc to grow the array when the user adds more marks and explain what happens if realloc fails.
Intentionally leak memory, then find it with Valgrind or LeakSanitizer.
Week 3
Linked lists step by step
A linked list stores items in separate nodes. Each node holds data and a pointer to the next node, and a head pointer remembers the first node. Unlike an array, inserting at the front does not move other items, but reaching the n-th item means following n links. Most list bugs come from changing pointers in the wrong order or forgetting the empty-list case.
1head
23 | next
35 | next
48 | next
5NULL
Step by step
Define struct Node { int data; struct Node *next; };
Write insertAtHead: allocate a node, set node->next = head, then head = node.
Write printList that walks from head until the pointer is NULL.
Write deleteValue that finds the node, links its previous node to the next one and frees it.
Test with an empty list, one node and several nodes.
In real life
A treasure hunt where each clue tells where the next clue is hidden: you can only reach clue 4 by following clues 1, 2 and 3.
Worked example
Problem. The list is 3 -> 5 -> NULL. After insertAtHead(1), what is the list?
Solution. The new node points to the old head (3) and becomes the head: 1 -> 3 -> 5 -> NULL.
Common mistakes
Setting head = new node before linking new->next, losing the old list.
Dereferencing NULL when the list is empty.
Freeing a node before reading its next pointer.
Try it yourself
Write a function that counts nodes.
Write reverseList that reverses the list in place and draw the pointers after each step.
List three test cases for deleteValue.
Try the questions
The same skills are asked at three levels: School (Classes 6–12), College and Professional. Switch the level and the language (English or Tamil), and say how sure you are before you check: knowing what you are unsure about is part of learning.
Classes 6–12: everyday examples, no prior knowledge. Practice only. Nothing here is graded or saved.
Question 1 / 4 · Idea of an address / pointer
A postman finds a house using its house number. In programming, a pointer stores…
Projects
Contact Directory with Linked List, BST and STL Comparison
Build a contact directory for a small business that holds 20,000 contacts. Implement the storage three ways, measure them and recommend one with evidence: a linked list in C-style code, a binary search tree, and std::unordered_map with smart pointers.
Tasks
Implement insert, search by phone number and delete for the linked list and for the BST.
Implement the same operations with std::unordered_map and std::unique_ptr<Contact>.
Generate 20,000 test contacts and time 1,000 searches for each version with std::chrono.
Run every version under AddressSanitizer and Valgrind (or LeakSanitizer) and fix all reported errors.
Write a one-page report with a results table and a justified recommendation.
Sample input
20,000 generated contacts; 1,000 random phone-number searches
Expected output
A table of timings (milliseconds) for list, BST and hash map, a clean sanitizer log and a recommendation such as "use unordered_map for lookups".
How it is assessed
Criterion
Weight
Correct data-structure implementations
25%
Memory safety (clean sanitizer and leak reports)
25%
Measurement method and results table
20%
Modern C++ usage (STL, smart pointers, RAII)
15%
Report clarity and recommendation
15%
Stretch challenge: Add persistence to a file and a unit test suite for the delete operation covering first, middle, last and missing items.
How you are assessed
Each week: a code-reading quiz (pointer and memory snippets, complexity matching), a lab with a sanitizer-clean run and a short written explanation of one bug found.
Practical work. Practical assessment: complete a data-structure task, show clean AddressSanitizer or Valgrind output, report timings and defend design choices in a viva.
What trainers look for
Weight
Correctness and memory safety
35%
Data-structure and algorithm choice
20%
Modern C++ usage
15%
Debugging evidence
15%
Explanation and report
15%
Where this can lead
Prepares you for systems, embedded and performance-sensitive programming roles and for further study of data structures.
Builds the memory-safety and debugging habits expected in professional C/C++ teams.
These describe skills you will build. ADIVAS does not guarantee jobs, placement or salary.
Other programmes in Programming & Software Development