Examveda

What is the correct syntax to dynamically allocate memory for an array of integers in C++?

A. int arr[size];

B. int arr[] = new int[size];

C. int *arr = new int[size];

D. int arr = new int[size];

Answer: Option C


Join The Discussion

Related Questions on Introduction to C plus plus