What is the real difference between arrays and pointers?

Answer Posted / pushpanjali panda

Arrays automatically allocate space, but can't be relocated
or resized. Pointers must be explicitly assigned to point
to allocated space (perhaps using malloc), but can be
reassigned (i.e. pointed at different objects) at will, and
have many other uses besides serving as the base of blocks
of memory.

Is This Answer Correct ?    56 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is function prototype?

612


How can I open a file so that other programs can update it at the same time?

664


What are # preprocessor operator in c?

632


What is adt in c programming?

612


What does typeof return in c?

640






which is conditional construct a) if statement b) switch statement c) while/for d) goto

740


What standard functions are available to manipulate strings?

565


What is volatile c?

526


What’s a signal? Explain what do I use signals for?

611


while initialization of array why we use a[][2] why not a[2][]...?

1869


What is the difference between union and anonymous union?

836


When should I declare a function?

624


Explain what are header files and explain what are its uses in c programming?

629


Is there a way to compare two structure variables?

617


Can you mix old-style and new-style function syntax?

665