malloc() and calloc() are functions in C that allocate memory dynamically from the heap. malloc() allocates a block of memory of a specified size, while calloc() allocates memory and initializes it to zero. Two sample programs are provided to illustrate the use of malloc() and calloc(): one program allocates memory for an integer using malloc() and assigns a value to it, while the other allocates an array of integers using calloc() and prints the values. Both programs free the allocated memory after use.