Programming Languages

213 articles in this topic

Classes and Objects MCQs: 12 Solved OOP Questions with Explanations

Solve 12 classes and objects MCQs, check each explanation, and use a worked Java trace to separate instance state, constructors, overloading and nested classes.

20 Oct 20267 min readProgramming Languages Survey

C++ Object Lifetime and Storage Duration: Trace Construction, Destruction, and Dangling State

Learn to separate scope, storage duration, lifetime, and ownership. Trace seven objects precisely, then repair dangling pointers, references, and views.

Updated 19 Oct 20265 min readC++

Packages and Access Modifiers in Java: Visibility Rules with Runnable Examples

Learn how Java package boundaries change member visibility. Compile a complete example covering public, protected, package-private and private access.

Updated 18 Oct 20265 min readJava

Exceptions in Python: Handle Errors with try, except and finally

Learn how Python exceptions change control flow, how to catch expected failures without hiding bugs, and when to use else, finally, raise, and custom exceptions.

Updated 18 Oct 20265 min readPython

Programming Language Syntax MCQs: 12 Solved Questions on Grammar, Tokens and Semantics

Solve 12 MCQs on syntax, tokens, pseudocode, C grammar and runtime behaviour. Each explanation identifies the rule and applies it.

Updated 16 Oct 20268 min readProgramming Languages Survey

C++ Diamond Problem: Ambiguity, Duplicate State and Virtual Inheritance

See why a C++ diamond duplicates base state, how virtual inheritance shares it, and when qualification, interfaces, or composition is the clearer design.

Updated 15 Oct 20265 min readC++

OOP Basics in Java: Classes, Objects and the Four Pillars with Runnable Examples

Connect Java's OOP syntax to design decisions with a complete Account example. Trace two objects through validation, overriding and runtime dispatch to exact output.

Updated 14 Oct 20265 min readJava

Context Managers in Python: with, __enter__, __exit__ and contextlib

Learn how Python's with statement guarantees cleanup, then build and trace class-based and generator-based context managers with runnable examples.

Updated 14 Oct 20266 min readPython

Imperative Programming Structure and Flow Control MCQs: 12 Solved Questions

Test whether you can trace changing state, choose the right loop, read a flowchart, and follow event-driven or exceptional control paths through 12 solved MCQs.

12 Oct 20267 min readProgramming Languages Survey

C++ Abstract Classes and Interfaces: Build a Usable Storage Contract

Build a C++17 ScoreStore interface, swap vector and hash-backed implementations behind it, and verify both with the same runnable contract test.

Updated 11 Oct 20265 min readC++

Classes and Objects in Java: Build and Trace Two Objects Step by Step

Build a Java Student class, create two independent objects, and trace fields, methods, aliases, null references, output, and common errors step by step.

Updated 10 Oct 20266 min readJava

Python Arguments and Scope: Parameters, LEGB, and Worked Examples

Trace how Python binds arguments, handles mutation and rebinding, and resolves names through LEGB. Runnable examples turn scope rules into predictable output.

Updated 10 Oct 20265 min readPython