Introduction to Programming

Question #71

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

CS201 · Final-term only#71

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