Why my last printf does not appear when i run the program?
Code:#include <stdio.h>
#include <stdlib.h>
int main(void){
char *buf;
buf=(char *)malloc(50*sizeof(char));
if(buf == NULL){
printf("Not enought memory to allocate buffer.\n");
exit(1);
}
printf("String was successfully allocated.\n");
free(buf);
if(buf == NULL){
printf("Successfull free.\n");
}
return 0;
}