Explain the possible consequences of dynamically creating memory inside a user-defined
function.
16.2 Consider the following statements that create space for an array of eight ints:
p = malloc(8 * sizeof(int));
p = calloc(8, sizeof(int));
Assuming that int uses four bytes, will the same statements work for storing an array of
16 two-byte short integers or a string of 32 characters? Explain with reasons.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here