Features and Use of Pointers in C/C++ Last Updated : 28 Jul, 2025 Suggest changes Share 51 Likes 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. Create Quiz C code_r Follow 51 Article Tags : C++ pointer cpp-pointer C-Pointers Pointers C-Pointer Basics +2 More Explore C++ BasicsIntroduction to C++3 min readData Types in C++6 min readVariables in C++4 min readOperators in C++9 min readBasic Input / Output in C++3 min readControl flow statements in Programming15+ min readLoops in C++7 min readFunctions in C++8 min readArrays in C++8 min readCore ConceptsPointers and References in C++5 min readnew and delete Operators in C++ For Dynamic Memory5 min readTemplates in C++8 min readStructures, Unions and Enumerations in C++3 min readException Handling in C++12 min readFile Handling in C++8 min readMultithreading in C++8 min readNamespace in C++5 min readOOP in C++Object Oriented Programming in C++8 min readInheritance in C++6 min readPolymorphism in C++5 min readEncapsulation in C++3 min readAbstraction in C++4 min readStandard Template Library(STL)Standard Template Library (STL) in C++3 min readContainers in C++ STL2 min readIterators in C++ STL10 min readC++ STL Algorithm Library3 min readPractice & ProblemsC++ Interview Questions and Answers1 min readC++ Programming Examples4 min read My Profile ${profileImgHtml} My Profile Edit Profile My Courses Join Community Transactions Logout Like