@Imsbajetha hey chandra the problem is with your array size so fix that .
@Imsbajetha hey chandra what about array used in function.
Got it Thanks