Computer Terminology
Computer Programming
C Programming
C++ Programming

What are the uses of pointers?

User Avatar
Wiki User
2008-02-22 11:20:01

The main advantages of using pointers are

1.) Function cannot return more than one value. But when the

same function can modify many pointer variables and function as if

it is returning more than one variable.

2.) In the case of arrays, we can decide the size of the array

at runtime by allocating the necessary space.

C has a minimum number of fundamental data types - a single

character, a single integer or float, and a few derived data types

such as a structure, an enumerated list, and an array. If you want

to do much more than that, you make use of pointers.

Pointers allow you to dynamically request memory to store off

information for use later. They allow you to create linked lists

and other algorithmically oriented data structures.

Copyright © 2020 Multiply Media, LLC. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Multiply.