ProgrammingModerate

Two sorted struct arrays of sizes n and m are merged into a new array. How many elements does the merged array hold?

  1. A. max(n, m)
  2. B. n x m
  3. C. n + m
  4. D. n + m - 1

Correct answer: C. n + m

A merge keeps every element of both inputs, so the output has n + m elements.

More C Programming questions

Exams that ask this topic