Multiple choice technology programming languages

C++

  1. char *a=new char[20];

  2. char a=new char[20];

  3. char a=new char(20.0);

  4. None of the Above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

This question is missing context, but option char *a=new char[20]; is the correct C++ syntax to dynamically allocate an array of 20 characters and assign its address to a pointer. The other options contain syntax errors.