Programming Languages

119 articles in this topic

Conditionals in C: if, if-else, else-if and switch with runnable examples

Learn how C chooses a path through a program. Predict and trace complete examples covering conditions, ladders, logical operators, nesting and switch.

Updated 4 Aug 20266 min readC

Pattern Printing Programs in C, Java and Python: One Method for Every Star and Number Pyramid

Stop memorising separate pattern programs. Learn how two row-wise decisions generate star pyramids, number triangles and their common variations in C, Java and Python.

Updated 4 Aug 20265 min readJava

Python Decorators and Generators: yield, Closures and the Trace-the-Output Interview Questions

See decorators and generators as functions that retain state. Trace a wrapped call, expand @repeat(3), and follow countdown(3) through StopIteration.

Updated 4 Aug 20266 min readPython

Programming Languages for GATE: C Syllabus Areas, Weightage Pattern and Prep Order

Build a bounded C preparation map, calculate topic shares from your own PYQ audit, and practise two fully worked traces before following a 14-day study order.

Updated 3 Aug 20266 min readProgramming Languages Survey

Abstract Classes in C++: Pure Virtual Functions, Examples and Errors

Learn why an abstract base cannot be instantiated but remains useful through pointers and references. Trace two shapes, fix override errors and practise safe polymorphism.

Updated 3 Aug 20267 min readC++

STL Overview in C++: Containers, Iterators and Algorithms with Runnable Examples

Build a practical STL mental model, then trace seven scores through sorting, searching, filtering and aggregation. The same data clarifies map, set and priority_queue choices.

Updated 2 Aug 20268 min readC

Java Coding Interview Questions: Programs Asked in Service-Company Drives

Prepare the short Java programs that recur in fresher drives. Learn the core string, array, number and collections patterns, then trace an O(n) Two-Sum solution.

Updated 1 Aug 20265 min readJava

OOP in Python: Classes, Inheritance, the MRO Diamond and Dunder Methods for Interviews

Work through Python's MRO diamond and the __eq__ plus __hash__ rule. These two examples explain many of the OOP output questions asked in interviews.

Updated 1 Aug 20265 min readPython

Language Design in Programming Languages: Syntax, Types, Scope and a Worked Evaluation

Trace one expression from source text to a value, then compare the design rules that make scope, typing, evaluation and mutation behave differently.

Updated 31 Jul 20266 min readProgramming Languages Survey

Function Overloading and Default Arguments in C++: Rules and Runnable Examples

Learn why overloading and default arguments are different C++ mechanisms. Compile one invoice program, trace every call, and repair ambiguous code.

Updated 31 Jul 20266 min readC++

Command Line Arguments in C: argc and argv Tutorial with Runnable Examples

Learn how argc and argv carry command line input into a C program, then practise argument tracing, numeric conversion, validation, and common fixes.

Updated 30 Jul 20265 min read156 viewsC

OOPs Concepts in Java: Inheritance, Polymorphism, Abstraction and Encapsulation with Worked Interview Questions

Turn the four OOP pillars into predictable Java behaviour. Trace superclass references, subclass objects, overridden methods, hidden fields and common follow-ups.

Updated 30 Jul 20265 min readJava