Shashi ShekharforPointerspointers.hashnode.dev·Oct 27, 2024PointersA pointer is a variable that stores the memory address of another variable. In languages like C and C++, pointers are commonly used for dynamic memory management, arrays, and data structures. Declaration and Initialization: int a = 10; int *p = &a; ...Discussdata structures
Sandeep Raveendra Kollisandeepkolli.hashnode.dev·Sep 29, 2024Pointer Data TypeIf I want to store the address of a variable, then what data type should I use to declare another variable? - Here is the solution. Solution is… If we declare a variable to store the address of a value (i.e., a pointer), the data type of the pointer...Discusspointers in c
Zouhair Grirzouhairgr-blog.hashnode.dev·Sep 24, 2024How to Use unsigned char* for Memory Manipulation in CWhat is unsigned char* in C and Why Do We Use It? In C programming, memory manipulation is an important task. One way to work with memory is by using the unsigned char* type. This type allows you to treat memory as a series of bytes, which is useful ...DiscussC#
Zouhair Grirzouhairgr-blog.hashnode.dev·Sep 24, 2024The Importance of Pointers for Strings in C ProgrammingWhen working with C, one of the core aspects you'll encounter is how data is passed to functions. Specifically, when dealing with strings, you'll see a common pattern like this: size_t ft_strlen(const char *str); In this blog, we’ll break down why w...Discuss·1 likeC#
Bhuwan Sharmabhuwan.hashnode.dev·Sep 22, 2024C Tutorial -6 (Pointers, pass by value, pass by reference)#include<stdio.h> #include<stdlib.h> // Q.2 Passing a pointer j to a function and printing its address. void print_address(int* j){ printf("%d\n", j); printf("%d", *j); } // Q.3 Program to change the value of a variable to ten times of its current va...DiscussC
Aman Kumaraksaman.wtf·Sep 14, 2024Understanding pointers with structs in cThis is the second part of the series Understanding C pointer shenanigans. If you already understand pointers, go ahead, but if want to get a better understanding of pointers in c, go to the part 1, read that and come back. Now, as you are here, i ho...DiscussPointers in CC
Anupam Srivastavacodingstalk.hashnode.dev·Jun 12, 2024What is the main function in C++?In the realm of programming languages, C++ stands tall as a powerhouse, revered for its versatility and efficiency. Central to the structure of any C++ program is the main function. In this article, we delve into the intricacies of the main function...Discusspointers in c
João Gabrieljoaojgabriel.hashnode.dev·May 15, 2024Complex Pointers in C Made EasierRequirements Here’s what I’m assuming you can understand: a declaration int *x; initializes a variable x to have the value of a pointer that (in this case) points to an address in memory; at that address there is space allocated for an int (how much ...Discuss·134 readsC
Sukalyan Roysukalyanroy.hashnode.dev·Apr 1, 2024Exploring PointersPointers Pointers are an important aspect of learning programming. It's a part of every 101 course and used in almost every major algorithm or data structure under the hood for greater performance. it's good to have a basic understanding of pointers,...Discuss·11 likes·49 readspointers
Giang Ngogiangblackk.hashnode.dev·Feb 25, 2024Dangling pointers problem in C vs RustI encounter this original blog about Stack Memory and Dangling Pointer problem in Zig language, then I asked myself, how about other system programming languages, like C language and Rust, do they have the same problem? This blog is a very short arti...DiscussRust