I wrote this program in c sharp language. I got an exception in a[k] = a[k+1]. In the final loop of k (a[6] = a[6+1]), array size is 7 only (index 6). How can we assign a[7] value to a[6] (like a[6] = a[7]). Can you please explain this sister? And I can send my code if it is possible to share your mail Id here.