What's wrong with this code?

 
double arr[];

arr[1]=22.0;
Print ("array.... ", DoubleToStr(arr[1],4),">>>",arr[1]);
arr[1]=22.0+1.5;
Print ("array.... ", DoubleToStr(arr[1],4),">>>",arr[1]);

results in log file are:
21:09:17 test2 GBPUSD,M1: array.... 0.0000>>>0
21:09:17 test2 GBPUSD,M1: array.... 0.0000>>>0

Can anyone help? I want to put calculated indicator value into arr and let it plot on chart.
 
arr[] is not allocated and not resized before assignment
use
double arr[2];


or

ArrayResize(arr,2);
Reason: