Q1. What is the difference between value types and reference types?
Value types store their data directly and are copied on assignment. Reference types store a reference to heap data, and copying copies the reference. - Value types: numer...
Technical Question Bank · Peer-Reviewed
Search and filter frequently asked interview questions across technical, programming, and behavioral domains. Tailor your interview preparation by difficulty for freshers or experienced developers (22 available).
Value types store their data directly and are copied on assignment. Reference types store a reference to heap data, and copying copies the reference. - Value types: numer...
A pointer is a variable that stores an address. It can be null, reassigned and used with pointer arithmetic. A reference is an alias for an existing object: it must be in...
Ownership is Rust's compile-time memory management model. Every value has exactly one owner, and when the owner goes out of scope the value is dropped and its memory free...
An array has a fixed length that is part of its type: `[4]int` and `[5]int` are different types, and copying an array copies all elements. A slice is a small descriptor w...
The stack is a LIFO region managed automatically: allocation is a pointer bump, extremely fast, and memory is reclaimed when the scope ends. The heap is a large pool mana...
`new(T)` allocates zeroed memory for a value of type T and returns a pointer `*T`. It works for any type and is rarely used. `make` only works for slices, maps and channe...
A generator is a function that yields values lazily using yield. Calling it returns a generator object that produces items on demand and remembers its position, so memory...
An operating system manages hardware and provides abstractions so programs do not talk to devices directly. Its main responsibilities are: - Process management: create, s...
Swift uses Automatic Reference Counting: each class instance has a reference count and is deallocated when the count reaches zero. ARC is deterministic, unlike a tracing ...
Memory is divided into heap (shared objects) and per-thread stacks (frames, locals). The heap has a young generation (Eden plus two survivor spaces) and an old generation...
HireXTech uses essential storage to remember your study preferences and third-party advertising cookies via Google AdSense in compliance with GDPR. You can choose to enable essential cookies only or accept all cookies. Read our Privacy Policy.