This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/free.c

18 lines
291 B
C

#include <stdio.h>
#include <stdlib.h>
void main()
{
char *buffer;
buffer = (char *)malloc( 80 );
if( buffer == NULL ) {
printf( "Unable to allocate memory\n" );
} else {
/* rest of code goes here */
free( buffer ); /* deallocate buffer */
}
}