Ask Question
18 March, 21:36

Which expression adds 1 to the element of array arrayName at index i, assuming the array is of type int? A. + +arrayName[ i ] B. arrayName++[ i ] C. arrayName[ i+ + ] D. None of the above

+3
Answers (1)
  1. 18 March, 23:18
    0
    A. + +arrayName[i]

    Explanation:

    In order to add 1 to the element of an array at the given index, we can use increment operators - + + sign. This operator can be placed either before the variable name or after the variable name. Note that since we deal with an array in this situation, the index of the array needs to be specified.

    In option A, pre-increment operator is used to increment value of arrayName variable at index i, + +arrayName[i]
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Which expression adds 1 to the element of array arrayName at index i, assuming the array is of type int? A. + +arrayName[ i ] B. ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers