Here we are incrementing pa by one unit of size float.
This is an address, but if we store it in a, then we would be
saying that &a[0]is now &a[1].Even a computer would be
confused!! Therefore not allowed, because the original
array declaration was
|
float a[10];
Dynamic Memory Allocation.
|
By using the three routines below we can implement
dynamically allocated arrays by providing a mechanism for
obtaining a pointer to a block of new memory.
|
#include <stdio.h>
void* malloc( size_t size );
void* calloc( size_t NumMembers, size_t size );
void free( void* p );
|
Look at the examples pointers-3.c and its associated output
pointers-3.log
|