What are pointers? what are advantages and disadvantages of pointers?
Answers
What are pointers?
In computer science, a pointer is a programming language object, whose value refers to (or "points to ")another value stored else where in the computer memory using it's memory address.
Advantages of pointers.
1)It allows management of structure which are allocated memory dynamically.
2)It allows passing of arrays and strings to functions more efficiently.
3)It makes possible to return more than one value from function.
Disadvantages of pointers.
1)We can access the restricted memory area.
2)Pointers require one additional deterrence, meaning that the final cord must be read the variable's pointer from the memory, than read the variable from the pointer to memory. This is slower than reading the value directly from memory.
3)If sufficient memory is not available during run time for the storage pointers, the program may crash.