Advantages and Disadvantages of Pointers
Advantages – Advantages and Disadvantages of Pointers
- Pointers are useful to utilize vast heap memory, which is otherwise wasted.
- Pointers are useful to directly get into memory and perform specifications to the variables so that the modifications can be retained after coming out of the function.
- Pointers are useful to write low level programs like device drivers and antivirus programs.
- Using pointers, it is possible to create data structures like stack, linked lists, etc.
Disadvantages – Advantages and Disadvantages of Pointers
- Pointers are highly confusing, which makes programming difficult.
- Pointers are security problem for data, Through pointers, it is possible to modify or delete data directly in memory.
- Pointers can easily crash programs.
- Pointers refer to dynamic memory.
- Debugging a program with many pointers will become a challenge.