If dynamic memory allocations fails, usually a NULL value is returned and an error message displayed, the wording of which depends on your implementation.