Q1. What is the difference between a pointer and a reference?
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...
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 (4 available).
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...
Iterative (O(n) time, O(1) space): ```python def reverse(head): prev = None while head: nxt = head.next head.next = prev prev = head head = nxt return prev ``` Recursive ...
Raw `new` and `delete` are error-prone, so C++11 introduced smart pointers in `` that express ownership. - `std::unique_ptr`: exclusive ownership, cannot be copied, is mo...
A method receiver can be a value (`func (u User) Name() string`) or a pointer (`func (u *User) SetName(n string)`). - A value receiver operates on a copy, so it cannot mu...
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.