public int[] tenRun(int[] nums) { int current; int i = 0; while(i < nums.length && nums[i] % 10 != 0) i++; if(i >= nums.length) return nums; current = nums[i]; i++; while(i < nums.length) { if(nums[i] % 10 == 0) current = nums[i]; else nums[i] = current; i++; } return nums; } What is the purpose of the above Java code? a) To replace all elements in an array with their nearest multiple of 10. b) To find the sum of elements in an array, replacing multiples of 10. c) To shift all elements in an array to the right until a multiple of 10 is encountered. d) To replace multiples of 10 in an array with the current multiple of 10.