Features and Use of Pointers in C/C++ Last Updated : 23 Jun, 2023 Comments Improve Suggest changes Like Article Like Report Pointers store the address of variables or a memory location. Syntax: datatype *var_name; Example: pointer "ptr" holds the address of an integer variable or holds the address of memory whose value(s) can be accessed as integer values through "ptr" int *ptr; Features of Pointers: Pointers save memory space.Execution time with pointers is faster because data are manipulated with the address, that is, direct access to memory location.Memory is accessed efficiently with the pointers. The pointer assigns and releases the memory as well. Hence it can be said the Memory of pointers is dynamically allocated.Pointers are used with data structures. They are useful for representing two-dimensional and multi-dimensional arrays.An array, of any type, can be accessed with the help of pointers, without considering its subscript range.Pointers are used for file handling.Pointers are used to allocate memory dynamically.In C++, a pointer declared to a base class could access the object of a derived class. However, a pointer to a derived class cannot access the object of a base class. Uses of pointers: To pass arguments by referenceFor accessing array elementsTo return multiple valuesDynamic memory allocationTo implement data structuresTo do system-level programming where memory addresses are useful Drawbacks of Pointers: If pointers are pointed to some incorrect location then it may end up reading a wrong value.Erroneous input always leads to an erroneous outputSegmentation fault can occur due to uninitialized pointer.Pointers are slower than normal variableIt requires one additional dereferences step If we forgot to deallocate a memory then it will lead to a memory leak. Comment More infoAdvertise with us Next Article Features and Use of Pointers in C/C++ C code_r Follow Improve Article Tags : C Language C++ pointer cpp-pointer C-Pointers Pointers C-Pointer Basics +3 More Practice Tags : CPPPointers Similar Reads Near, Far and Huge Pointers in C In older times, the intel processors had 16-bit registers, but the address bus was 20-bits wide. Due to this, CPU registers were not able to hold the entire address at once. As a solution, the memory was divided into segments of 64 kB size, and the near pointers, far pointers, and huge pointers were 4 min read Size of Pointers in C As pointers in C store the memory addresses, their size is independent of the type of data they are pointing to. This size of pointers in C only depends on the system architecture. That is why it is equal for every pointer type for same operating system and CPU architecture.The pointer size reflects 3 min read Array of Pointers in C In C, a pointer array is a homogeneous collection of indexed pointer variables that are references to a memory location. It is generally used in C Programming when we want to point at multiple memory locations of a similar data type in our C program. We can access the data by dereferencing the point 6 min read Applications of Pointers in C Pointers in C are variables that are used to store the memory address of another variable. Pointers allow us to efficiently manage the memory and hence optimize our program. In this article, we will discuss some of the major applications of pointers in C. Prerequisite: Pointers in C. C Pointers Appl 4 min read Function Pointers and Callbacks in C++ A callback is a function that is passed as an argument to another function. In C++, we cannot directly use the function name to pass them as a callback. We use function pointers to pass callbacks to other functions, store them in data structures, and invoke them later. In this article, we will discu 2 min read Like