


























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Dynamic memory allocation, Advantages of Dynamic memory allocation, Disadvantages of static memory allocation, Programming errors, Compile Time Allocation, Heap are the key points of this lecture.
Typology: Slides
1 / 34
This page cannot be seen from the preview
Don't miss anything!



























Today’s Agenda
Compile Time Allocation
Dynamic Memory Allocation
Pointers
void *ptr ;
Cast
( int * ) ptr ;
( int * ) calloc ( 1000 , sizeof ( int ) ) ;
Example 1 int *iPtr ; iPtr = ( int * ) calloc ( 1000 , sizeof ( int ) ) ; if ( iPtr == NULL ) exit ( ) ;
void * malloc ( n ) ;