∑GateAndNet
PlannerSign Up

Polyglot Language Semantics Comparison (GATE & UGC NET Traps)

Behavior / FeatureC (C99/C11)C++ (C++17)JavaPython 3JavaScript (ES6+)
Parameter PassingPass-by-Value (pointers simulate ref)Value, Reference T&, Move T&&100% Pass-by-Value (of refs)Pass-by-Object-ReferencePass-by-Value (of refs)
-7 / 3 and -7 % 3-2 and -1 (truncates toward 0)-2 and -1-2 and -1-3 and +2 (floors toward −∞-\infty!)-2.333.. and -1
Default Method DispatchFunction pointersStatic (unless virtual)Dynamic (virtual) by defaultDynamic duck typingPrototype chain lookup
Memory ReclamationManual malloc/freeRAII + unique_ptr/shared_ptrTracing GC (Heap)Ref-Counting + Cycle GCMark-and-Sweep V8 GC
Multiple Inheritance—✅ Classes (virtual solves diamond)❌ Classes; ✅ interfaces✅ C3 Linearization MROSingle prototype chain

Intel 8085 Interrupts & Instruction T-State Quick Sheet

Interrupt / OpcodeKey Exam FactHex Vector / T-States
TRAP (RST 4.5)Highest priority, Non-Maskable, Edge + Level triggered0024H
RST 7.5 / 6.5 / 5.5Maskable via SIM; 7.5 is rising-edge, 6.5/5.5 level003CH / 0034H / 002CH
LDA addr / STA addr3-byte Direct memory access (4 Machine Cycles)13 T-States
LHLD addr / SHLD addr3-byte 16-bit HL load/store (5 Machine Cycles)16 T-States
CALL addr3-byte subroutine jump (6T opcode fetch + 2 reads + 2 stack pushes)18 T-States
INX rp / DCX rp16-bit increment/decrement — updates ZERO flags!6 T-States