Vidyalelo
Data Structure · Q141

Arrays in Data Structures

Programming · Data Structure · question 141

Q141

Consider the following piece of code in C++. What does the following code implement? #include using namespace std; int main() int *arr_vla; int size; cout >size; arr_vla = new int [size]; for (int i = 0; i >arr_vla[i]; for(int i = 0; i < size; i++) cout<<arr_vla[i]<<" "; cout<<endl; return 0;

A.
Variable-length array
Answer
B.
Fixed-size array
C.
Dynamic memory allocation
D.
Error

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board