1.

Which of the following is/are valid ways to allocate memory for an integer by dynamic memory allocation in CPP?

A. int *p = new int(100);
B. int *p; p = new int; *p = 100;
C. int *p = NULL; p = new int; *p=100;
D. Only 1,2
E. All of these
Answer» F.


Discussion

No Comment Found

Related MCQs