#include<stdlib.h>intmain(){char*str;if((str=malloc(15))==NULL){printf("Notenoughmemo... #include <stdlib.h>

int main()
{
char *str;
if ((str = malloc(15)) ==NULL)
{
printf("Not enough memory to allocate buffer\n");
exit(1);
}

strcpy(str,"hello world");
printf("String is %s\n",str);
free(str);
}