What is the Point of Pointer's

F

Foobarius Frobinium

Bill Potter said:
I am a learning programmer in C and i want to know why some one would use
pointers instead of going direct!

Well, plenty of reasons. Since, obviously, you don't want to make all
data global, you can use them to reference data defined in other
functions. Dynamic allocation in C is done with pointers, as well as
command line arguments (int argc, char **argv). Plus, by referencing
data instead of copying it, you don't waste space.
 
P

pete

Emmanuel said:
Mabden wrote on 05/08/04 :

Don't mix pointer and address. A pointer is avariable. An address is
the value of a pointer.

The address of an object, has a pointer type and can be
used in a function call, where a pointer argument is required.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top