Why do we need pointers when we already have variable names?
I'm learning C++ and don't really see why I'd use a pointer instead of just writing the variable's name. What does a pointer let me do that the…
I'm learning C++ and don't really see why I'd use a pointer instead of just writing the variable's name. What does a pointer let me do that the…
I'm learning C for fun, but pointers, structs, and dynamic memory aren't clicking yet. Where should a beginner start, and are there free resources worth using? Is learning…
I've been learning C for a few days and pointers have me confused. AI-generated lessons jump into complicated projects before I understand the basics. What's a better way…
I have experience with Python, Python backend frameworks, JavaScript, and TypeScript, and I want to learn a lower-level programming language next. Rust seems like a modern alternative to…
If a variable x is stored at memory address 2000, and a pointer p contains the value 2000, where is p itself stored? Does the computer need another…
Suppose a variable x is stored at memory address 2000, and a pointer p contains the value 2000. Since p is itself a variable, it must also be…
I learned programming basics in school with QBasic, including variables, arrays, loops, conditionals, and a brief introduction to functions, classes, objects, and OOP in C. I then focused…
I started programming with QBasic, learning variables, arrays, loops, conditionals, and a basic introduction to functions, classes, objects, and OOP in C. My main goal was always game…
I've completed a beginner programming course, but I still don't have a strong understanding of why things work. In a recent review problem, the solution used a pointer,…
I've completed a beginner programming course, but I still don't feel like I understand why pointers exist. In a recent review problem, the solution used a pointer, and…
I already know how to program in Python and have built a few small games in C++. I'd like to learn C properly and am looking for advice…
I already know Python and have built a few small games in C++. I'd like to learn C properly and am looking for advice on what to focus…
I'm a university student studying Computer Engineering. I learned basic programming concepts such as variables, data types, loops, functions, arrays, matrices, and problem-solving with JavaScript. I'm now learning…
I'm trying to understand this C function that sums the first n elements of an array: int sum(int *t, int n) { int sum = 0; for (int…
In C, this function sums the first n elements of an array: int sum(int *t, int n) { int sum = 0; for (int i = 0; i…
I'm learning C++ because I'm interested in robotics and game development, and I'll also need it for college. I've previously made small projects in Java, Python, C#, and…
I'm learning C because I want more than just another programming languageโI want to understand the ideas behind programming and computer science. However, I keep getting pulled into…
I'm learning C because I want more than experience building simple CRUD applications with C# and TypeScriptโI want to understand the computer science and underlying principles behind programming…
I'm trying to understand whether JavaScript supports pointer-like behavior. My original problem is that I'm using `Object.assign(map.get(key), value)`, and although `map.get(key).start === value.start` returns `true`, `map.get(key) === value`…
I'm trying to understand pointers and object references in JavaScript. My original goal was to make an entry associated with a key refer to the exact same object…