๐ŸŒ
Blogger
programmertutor16.blogspot.com โ€บ 2013 โ€บ 10 โ€บ advantages-and-disadvantages-of.html
Advantages and disadvantages of pointers in c - PROGRAMMER TUTORIAL
If pointers are updated with incorrect values, it might lead to memory corruption. Basically, pointer bugs are difficult to debug. Its programmers responsibility to use pointers effectively and correctly. Advantages and disadvantages of pointers in c Reviewed by Mursal Zheker on Sabtu, Oktober ...
๐ŸŒ
Quora
quora.com โ€บ What-are-some-disadvantages-of-pointers-in-C
What are some disadvantages of pointers in C? - Quora
Answer (1 of 6): Some more disadvantages of pointers in C: * Arrays passed as a function parameter decay to a pointer to the first element of the array, obscuring whether the parameter is intended to point to an array or a single data element.
๐ŸŒ
Quora
quora.com โ€บ What-are-the-advantages-and-disadvantages-of-using-pointers-in-C-programming-language
What are the advantages and disadvantages of using pointers in C programming language? - Quora
Without pointers, it would be extremely cumbersome to deal with character strings. Without pointers, you could not use a great many standard library functions, as they return pointers and/or take them as argument...
๐ŸŒ
Codesansar
codesansar.com โ€บ c-programming โ€บ drawbacks-pointer-c.htm
Drawbacks of Pointer in C Programming
Using pointer in C programming has following disadvantages: If pointers are referenced with incorrect values, then it affects the whole program. Memory leak occurs if dynamically allocated memory is not freed.
๐ŸŒ
Tutorialtpoint
tutorialtpoint.net โ€บ 2021 โ€บ 06 โ€บ advantages-and-disadvantages-of-pointers-in-c.html
Advantages and disadvantages of pointers in C ~ TUTORIALTPOINT- Java Tutorial, C Tutorial, DBMS Tutorial
A pointer is a variable which holds the memory address of another variables. Pointers are more useful to handle complex data structures like liked list and trees. ... Pointers are more efficient in handling arrays and data tables.
๐ŸŒ
Reddit
reddit.com โ€บ r/cpp_questions โ€บ what are the disadvantage of using c or c++ while never using pointers or shared pointers?
r/cpp_questions on Reddit: What are the disadvantage of using C or C++ while never using pointers or shared pointers?
October 30, 2022 -

I avoid using pointers to avoid crashes entirely, and I prefer using STL containers instead like map or vector or others. I don't use polymorphism either (I prefer data oriented programming, but that's another story). I still use references which are safer (how much safer?) but can still crash.

Can using pointer-less C++ code lead to worse performance or higher energy consumption (but such pointer-less C++ code would still run faster than other languages, I believe?).

And if it leads to worse performance, are there some coding practices to maximize performance in such pointer-less C++ code? What sort of optimization are compilers able to do when data is passed by value or returned by value? Are there pitfalls to avoid when never using pointers?

Can functional programming in C++, as described in this article, also be relevant when avoiding pointers ? : http://sevangelatos.com/john-carmack-on/

(I am posting this question here since it was closed on stackoverflow)

Top answer
1 of 5
8
"I avoid using pointers to avoid crashes entirely". So, right from the start your premise is wrong. This is not the way to avoid crashes. You avoid crashes by using smart pointers instead of raw owning pointers, the proper use of which pretty much guarantees memory will always be valid. If you're using reference which can crash, then you're just masking shared ownership, and should be using a shared_ptr or a weak_ptr. The trick with C++ is to have a good understanding of ownership semantics, and using smart pointers will actually help with this by enforcing those roles. "I don't use polymorphism either" is also needlessly dogmatic and impractical. I mean, good for you if you prefer composition over inheritance, but there are times polymorphism is actually the best, most practical answer. Even as a professional game developer, I don't hesitate to use polymorphism where it makes sense, and we've always got top performance on our minds. In short, I think you're rejecting a lot of idiomatic or best practices in C++ to no good end. Using pointer-less code is just going to make it more clumsy to use and reason about memory semantics. I don't think it will make much of a difference in terms of performance. As for functional programming... that's a big topic on it's own. But the whole concept of "avoiding pointers" seems so wrongheaded to me, I'm not sure it's worth delving into the topic with that kind of focus anyhow.
2 of 5
5
Well, ownership is basically solved by smartpointers. The only problem remaining is dangling pointers and since references are basically the same a dangling reference is as much likely as a dangling pointer. If you dont use pointers but references your code isnt anything safer if you already follow best practices in terms of ownership and STL containers I dont see any specific disadvantages beside making yourself life a little harder
๐ŸŒ
Filo
askfilo.com โ€บ cbse โ€บ smart solutions โ€บ what are the advantages and disadvantages of using pointers? d
What are the advantages and disadvantages of using pointers? Differentia..
December 19, 2025 - Disadvantages: Can lead to complex and hard-to-debug code. Risk of memory leaks and dangling pointers if not managed properly. Pointer misuse can cause program crashes or security vulnerabilities.
๐ŸŒ
O'Reilly
oreilly.com โ€บ library โ€บ view โ€บ object-oriented-programming โ€บ 9789332503663 โ€บ xhtml โ€บ head-0593.xhtml
12.13 - Advantages and Disadvantages of Pointers - Object Oriented Programming with C++, Second Edition [Book]
May 15, 2012 - Dangling pointers, mostly, create difficult to diagnose errors. Pointers lead to memory leaks. For parameter passing with reference, in C language using pointers were compulsory. Now C++ has new construct which is far superior.
Authors ย  Mahesh BhaveSunil Patekar
Published ย  2012
Pages ย  679
๐ŸŒ
Dotnet Tutorial
dotnetustad.com โ€บ c-programming โ€บ pointer-advantages-and-disadvantages
Pointer Advantages and Disadvantages
While pointers are powerful and essential in C and C++ programming, they should be used with caution, following best practices, and thorough testing to minimize associated risks
Find elsewhere
๐ŸŒ
Blogger
see-programming.blogspot.com โ€บ 2013 โ€บ 10 โ€บ advantages-and-disadvantages-of.html
Computer Programming And Technology For Dummies: Advantages and disadvantages of pointers in c
The text provides a clear overview of pointers in C, highlighting both their advantages and disadvantages. Pointers offer powerful capabilities like direct memory access, dynamic memory management, and efficient data handling, which are essential for building complex data structures.
๐ŸŒ
Reddit
reddit.com โ€บ r/cpp_questions โ€บ what advantages/disadvantages do pointers/references have?
r/cpp_questions on Reddit: What advantages/disadvantages do pointers/references have?
May 3, 2019 -

I see a lot of people using pointers/references instead of a actual variable. I know that pointers are variables that store the memory location of a already existing variable and that references are not stored in memory because they "reference" to a variable (and because of that, it can't change to what it references on later).

I can think only 2 cases where pointers/references are useful:

  • Because I can't return an array, when I want to return one, I can return a reference to it.

  • To avoid variable-duplication.

Apart from this, I can't think why should I want to use them.

Did I understand something wrong?

๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ c language โ€บ c-pointers
Pointers in C - GeeksforGeeks
Pointers are used to form complex data structures such as linked lists, graphs, trees, etc. Pointers reduce the length of the program and its execution time as well. Pointers are vulnerable to errors and have following disadvantages:
Published ย  November 14, 2025
๐ŸŒ
Sankalandtech
sankalandtech.com โ€บ Tutorials โ€บ C โ€บ cons-pointer-c.html
disadvantage or cons of pointer in c language.
disadvantage or cons of pointer Memory leaks,Dangling pointers,Null pointer dereferencing,Pointer arithmetic complexity,Security vulnerabilities
Top answer
1 of 2
9

I'm not sure where you get the idea that modern languages don't have pointers. In Ruby, for example, everything is a pointer. It's true that Ruby doesn't have special syntax or special operations for pointers, but that doesn't mean that there are none. Quite the opposite, in fact: because everything is a pointer, there is no need to distinguish between pointers and non-pointers, pointer operations and non-pointer operations. Pointers are so deeply ingrained in the language that you don't even see them.

The same is true for Python, Java, ECMAScript, Smalltalk, and many other languages.

What those languages don't support, is pointer arithmetic or fabricating a pointer out of thin air. But then again, some CPUs don't allow that either.

The original CISC CPU for the AS/400 distinguishes between pointers and integers. You can store pointers and you can dereference pointers, but you cannot create or modify pointers. The only way to get a pointer is if the kernel hands one to you. If you try to do arithmetic on it, you get back an integer, which cannot be converted to or used as a pointer. Even the modern PowerPC and POWER CPUs have a special tagged address mode specifically for running OS/400 / i5/OS / IBM i.

Go has pointers in the more traditional sense, like C. But it also doesn't allow pointer arithmetic.

Other languages have pointers and pointer arithmetic, but a set of restrictions that ensure that pointers are always valid, always point to initialized memory, and always point to memory that is owned by the entity performing the arithmetic.

2 of 2
3

Almost all modern programming languages use indirection extensively under the hood - any instance of a Java type that's derived from Object is referenced through a pointer (or pointer-like object), for example.

The difference is that those programming languages don't expose any pointer types or operations on pointer values to the programmer. You can't take the address of a Java Object instance and examine it directly, nor can you use it to offset an arbitrary number of bytes into the instance (even though the JVM does so internally). The language simply doesn't provide any mechanism for the programmer to do so. It doesn't define a method or operator to obtain an object's address; it doesn't define a method or operator to examine the contents of an arbitrary address; it doesn't define the binary + or - operators to work with address types. The [] operator doesn't just offset from a base address; it's smart enough to throw an exception if you attempt to index past the end of the array.

Remember that C was developed (at least in part) to implement the Unix operating system; since any OS needs to manage memory, the language needed to provide operations on memory addresses as well as other types.

C became popular for applications programming because C compilers were small, fast, and produced fast code. Being able to manipulate memory directly sped up a number of operations. Unfortunately, being able to manipulate memory directly also opened up a huge can of worms with respect to security, correctness, etc. Everything from the Morris worm to the Heartbleed bug was enabled by C's ability to manipulate memory. Also, C's pointer syntax could be confusing, especially since unary * has lower precedence than postfix operators like [], (), ++, ., ->, etc. The fact that array expressions "decay" to pointer types also leads to problems for people who don't really know the language that well.

So modern programming languages don't expose pointers the way C does to avoid many of these problems. However, note that most of C's contemporaries (Pascal, Fortran, BASIC, etc.) didn't expose operations on pointer values either, even though they used pointer-like semantics under the hood (passing arguments by reference, COMMON blocks, etc.).

๐ŸŒ
UKEssays
ukessays.com โ€บ home โ€บ advantages and disadvantages of using a pointer computer science essay
Advantages And Disadvantages Of Using A Pointer Computer Science Essay | UKEssays.com
When setting up data ststructures like lists, queues and trees, it is necessary to have pointers to help manage how the structure is implemented and controlled.Pointers and Structures can be used to build data structures that expand and shrink during execution examples stack queues,trees etc.While pointer has been used to store the address of a variable,it more properly applies to data structures whose interface explicitly allows the pointer to be manipulated as a memory address.Because pointers allow largely unprotected access to memory addresses.
๐ŸŒ
Ques10
ques10.com โ€บ p โ€บ 68382 โ€บ what-is-pointer-explain-its-advantages-and-disad-1
What is Pointer? Explain its advantages and disadvantages of it
Pointer reduces the execution of the program. ... Pointer are slower than normal variables. Uninitialized pointer might cause segmentation fault. Dynamically allocated block needs to be freed explicity. Otherwise, it would lead to memory task. If pointer bugs are updated with incorrect values, ...
๐ŸŒ
CSE Department
cse.poriyaan.in โ€บ topic โ€บ drawbacks-of-pointers-50391
Drawbacks of Pointers - Programming in C
For example, if a function dynamically allocates memory for 100 double values and forgets to free the memory and in worst case if that function is called several times within the code then ultimately the system may crash. Dangling pointer Dangling pointers arise when an object is deleted or de-allocated, without modifying the value of the pointer.
๐ŸŒ
Geek Interview
geekinterview.com โ€บ question_details โ€บ 82680
Pointer Disadvantages
1.) If sufficient memory is not available during runtime for the storage of pointers, the program may crash (least possible) 2.) If the programmer is not careful and consistent with the use of pointers, the program may crash (very possible) Read more: ... In general, there's no good way to ...
๐ŸŒ
GNU
gnu.org โ€บ software โ€บ c-intro-and-ref โ€บ manual โ€บ html_node โ€บ Pointer-Arithmetic-Drawbacks.html
Pointer Arithmetic Drawbacks (GNU C Language Manual)
Next: Pointer-Integer Conversion, ... is also the cause of a major security flaw in the C language. Theoretically, it is only valid to adjust a pointer within one object allocated as a unit in memory....