// chapter10.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include int main(int argc, char* argv[]) { char * string; string=NULL; /* Allocate space */ string = (char *)malloc(5); if( string == NULL ) printf( "Insufficient memory available\n" ); else { *(string+0)='a'; *(string+1)='b'; *(string+2)='c'; *(string+3)='d'; *(string+4)='\0'; printf("%s\n", string); free( string ); printf( "Memory freed\n" ); } //printf("%x\n", p); /*for(int i=0; i