This is my code
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int Size;
int arr[Size];
cin >> Size;
//cout << Size;
for(int i = 0; i < Size; i++){
cin >> arr[i];
cout << Size;
}
//cout << Size;
//cout << arr[Size - 0];
return 0;
}
this is my input:
4
1 4 3 2
and for some reason the Size is turning from 4 to 2 at the very end of the loop
4442
Why is this happening and how do I solve this?