Programming Languages
213 articles in this topic

Preprocessor and Macros in C: Expansion Rules and Worked Examples
Learn what happens before C compilation, expand object-like and function-like macros by hand, and avoid precedence and repeated-evaluation bugs.

Java File I/O and NIO Tutorial: Streams, Path, Files, Channels and Buffers
Learn which Java file API to choose, then run one program that writes and reads text, archives a file, traces an 8-byte buffer, and checks exact output.

Python Generators and Iterators Tutorial: yield, next() and Lazy Evaluation
Build Python's iterator protocol from a three-value list, trace generators one request at a time, and practise safe one-pass pipelines with exact outputs.

Rust Tutorial for Beginners: Ownership, Types and a Text Counter
Build a small Rust text analyser and trace what the compiler sees. The example connects basic types and control flow to moves, borrows and owned results.

C++ Encapsulation and Class Invariants: Build Objects That Stay Valid
Learn to design a C++ BankAccount that cannot be created or changed into an invalid state. Trace constructor checks, guarded operations, representation leaks, and boundary tests.

Variables and Data Types in C: Declarations, Conversions and Runnable Examples
Learn how C types control stored values, expressions and I/O. Compile a complete marks program, trace its conversions and repair common type mistakes.

Methods in Java: Syntax, Parameters, Return Values and Examples
Build and trace a complete Java score program, then learn how arguments, return types, void methods, instance calls and overloads work.

Introduction to Python: Core Concepts, Worked Trace and Exam Patterns
Build a reliable Python tracing method from names and types to loops and mutable lists. Follow one function across every iteration and check its exact output.

Kotlin vs Java for JVM Applications: A Clear Trade-off Guide
Choose between Kotlin and Java using the same Ticket #42 service example, a migration checklist, and a scorecard whose winner changes when team priorities change.

C++ deque, list and forward_list: Choose the Right Non-Vector Container
Use one controlled sequence-editing workload to compare deque, list and forward_list. See where search cost, iterator validity and memory locality change the decision.

Unions in C: Syntax, Shared Memory and Worked Examples
A C union reuses one storage region for alternative member types, while a separate enum tag keeps each payload read consistent. Safe member switching prevents stale reads, layout mistakes, and character-array errors.

Loops in Java Tutorial: for, while, do-while and Worked Examples
Build one reliable control-flow model for every Java loop. Trace runnable examples, avoid boundary and update errors, and practise counting executions.