The function mallocallocates bytes and takes as input the number of bytes that you would like to allocate. The operator sizeofreturns the number of bytes for this type. In this case, a charis 1 byte, but in the case int, most likely 4 bytes, or doublemost likely 8 bytes. An expression n * sizeof(char)converts a number charto the number of bytes desired.
, char, , , , , , , .
, , n char buf .