Why were the pointers importent to navigators?

i say answer    
  • 0
Pointers are important to  navigators because they help in providing the specific direction to the person so that they can instruct the sailor to go in the right direction to reach the destination.
  • 6
SAME AS MADHURIYS.
  • 2
This helped navigators determine the north direction before the invention of the magnetic compass.
  • 0
The pointers are important to navigators because it helped navigators determine the direction before the invitation of the magnetic compassion.
  • -1
Importance of pointers:-
Pointers are used in situations when passing actual values is difficult or not desired.
To return more than one value from a function.
They increase the execution speed.
The pointer are more efficient in handling the data types .
Pointers reduce the length and complexity of a program.
The use of a pointer array to character string results in saving of data.
To allocate memory and access it( Dynamic memory Allocation).
Implementing linked lists, trees graphs and many other data
Structures.
Pointers allow you to implement sharing without copying i.e. pass by reference v/s pass by copying. This allows a tremendous advantage when you are passing around big arrays as arguments to functions.
Pointers allow modifications by a function that is not the creator of the memory i.e. function A can allocate the memory and function C can modify it, without using globals, which is a no-no for safe programming.
allow us to use dynamic memory allocation.
Pointers obviously give us the ability to implement complex data structures like linked lists, trees, etc
Pointers allow ease of programming, especially when dealing with strings. This is due to the fact that a pointer increment will move by the size of the pointee i.e. easy coding to increment to the next memory location of an array, without worrying about how many bytes to move for each data type. I.e. a pointer to a char will move the pointer by a byte, pointer to an int, by the size of the int, etc NOTE that this is important because you do not have to worry about the size of the data types which can vary on different architectures.
Pointers allow us to resize the data structure whenever needed. For example, if you have an array of size 10, it cannot be resized. But, an array created out of malloc and assigned to a pointer can be resized easily by creating a new memory area through malloc and copying the old contents over. This ability is very important in implementing sparse data structures also.
  • 0
What are you looking for?