YOUR SUBJECT CS608 Software Verification and ValidationChange subject ↗
Introduction to Programming

Question #6

Read the question, compare the options, and review the correct answer below.

CS201 · Midterm#6

Which of the following is the correct C++ syntax to allocate space dynamically for an array of 10 int?

  1. A
    new int(10) ;
  2. B
    new int[10] ;
  3. C
    int new(10) ;
  4. D
    int new[10];
Show correct answer

Correct answer: B. new int[10] ;

Check community answers against your course notes.
← More practice questionsTake a timed test