Geography, asked by h1arroxvveyvanshith, 1 year ago

why were the pointers important to navigators

Answers

Answered by KS2000
12
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.
Answered by Priatouri
29

In the following ways, the pointers are important to navigators:

1. They provide specific direction to the navigators.

2. A pointer usually points towards the North direction, therefore, the navigators can easily get to know about the direction they want to go.

3. The pointers in that sense save the time of sailors as they had accurate information about routes provided by pointers.

Similar questions