Top

Discussion

Which of the following is true?

  • A."ptr = calloc(m, n)" is equivalent to following
    ptr = malloc(m * n);
  • B."ptr = calloc(m, n)" is equivalent to following
    ptr = malloc(m * n); memset(ptr, 0, m * n);
  • C."ptr = calloc(m, n)" is equivalent to following
    ptr = malloc(m); memset(ptr, 0, m);
  • D."ptr = calloc(m, n)" is equivalent to following
    ptr = malloc(n); memset(ptr, 0, n);

Answer: B

No answer description available for this question.

No comment is present. Be the first to comment.
Loading…

Post your comment