Which among the following is correct syntax to declare a 2D array using new operator?
(a) char (*pchar)[10] = new char[][10];
(b) char (pchar) = new char[][10];
(c) char (*char) = new char[10][];
(d) char (*char)[][10]= new char;
The question was posed to me by my college professor while I was bunking the class.
I would like to ask this question from New Operator topic in section Memory Allocation & Scope of Variable of Object Oriented Programming