Write a program using pointers to compute the sum of all elements stored in an array. Later display those results to the screen.

Write a program using pointers to compute the sum of all elements stored in an array. To solve this, we will follow these steps −.


Write a program using pointers to compute the sum of all elements stored in an array. How to write a C Program to find Sum of Even and Odd Numbers in an Array using For Loop, While Loop, Functions with example. Continue doing this until the array is split into sections 2 elements long. In this 6. e 10+3+9] Eg2) Array Elements - 7,1,2,3,6 O/P:19 Eg3) Array Elements - 1,6,4,7,9 O/P:10 C program to print the square of array elements; C program to find two elements whose sum is closest to zero; C program to check a given number appears more than N/2 times in a sorted array of N integers; C program to find the median of two sorted arrays with same using simple merge-based O(n) solution Step 2: Create a header file and include the library on it. import numpy as np. Here, we have learnt how to implement a C++ program to print the average of array function using pointer. Refer an algorithm given below to find the sum of perfect square elements in an array by using pointers. All the elements will be added to the garbage value. But i'm getting a bunch of errors back that I don't quite understand. Declare an array of integers. Notify me of new posts by email. 2. sum += myArray[i]; } System. Return sum to the called function and print it. 2k points) data structure Sum of N Numbers using Arrays; Sort Array Elements; Remove Duplicate Elements; Sparse Matrix; Square Matrix; Determinant of 2x2 matrix; Normal and Trace of Square Matrix; Addition and Subtraction of Matrices; Matrix Mulitplication; Pointer . Example Get your own Java Server. 6. Write a script that will find the sum of the array elements using pointers Conditions a) The user should be prompted to make a decision on the size of the array. After the termination of the loop, print the value of the sum. Given a pointer to an array of integer elements and the number of elements in the array, find the sum of elements. Step 3 − Declare and initialize the sum=0. Step 4: Declare one array (a [10]) and two variables (i,n) and initialize one variable (sum=0). 2 days ago · The idea behind this approach is to utilize the divide and conquer strategy to find the sum of elements in a given array. Follow the steps below to solve the problem: Take N elements and a pointer to store the address of N elements. For the 8-element array above, this takes two steps: May 29, 2020 · C program to compute Sum, Mean & Standard deviation of N numbers using pointers#SystemSoftware #OperatingSystem #SystemSoftwareLabProgram #CProgram #SSOSLab Question: Question5) Write a program in C to compute the sum of all elements in an array using pointers Test Data : Input the number of elements to store in the array (max 10): 5 Input 5 number of elements in the array: element - 1:2 element - 2:3 element - 3:4 element - 4:5 element - 5:6 Expected Output: The sum of array is: 20 Sep 11, 2020 · 1)Read the array size and store it in the variable n. Test Cases: [20 points) 0 (Input-> Array_Name (2,4,5,7,8], Outcome->26) (11) (Input-> Array_Name (1,2,3,4,5), Outcome->15) Problem 4: Write a recursive function in C programming to calculate sum of digits of a Nov 29, 2023 · The third for loop calculates the sum of all the elements in the array by iterating over each element of the array and adding its value to the variable sum. e size of array as input. AlgorithmBegin Initialize the array elements with values from user input. b) The user should also be prompted to type in the individual element of the array c) Use Pointers! C PROGRAMMING ONLY. Notify me of follow-up comments by email. Dec 2, 2021 · However, since you stated in the comments section that you are supposed to use arrays, then you are probably supposed to first read all 10 numbers from std::cin into an array of 10 elements and then calculate the sum afterwards: Sep 24, 2020 · Yes Sir, it is quite surprising, but the range of arr is only valid from arr[0] to arr[4], the rest of the elements cannot be deferenced due to the one-past rule, it is very unlikely that there will be problems, since C doesn't do range checking, but it's UB, anyway it was an observation to the OP, I was pretty sure you would deny the obvious (it is well explained in the accepted answer). e. By the way, data[0] is equivalent to *data and &data[0] is equivalent to data. That is, you should call your function like so: Array_Sum = GetValue(Array, 6); You furthermore have a problem with your GetValue() function: int GetValue(int *p[], int size) {. Say int sum;. 69. C program to find second largest element in the array . Java. Store the elements in the allocated memory. getSum (inputArray, 0, N-1) = getSum (inputArray, 0, mid) + getSum (inputArray, mid+1, N-1); where mid = (N-1)/2; Recursion will terminate when size of the array becomes less than 1. Using For loop to get to the every index element and Apr 8, 2017 · So this is the code: #include <stdio. Find the length of a String Concatenate two strings Copy a String Reverse a string using recursion Compare two string Find the number of vowels consonants digits & white spaces Find the frequency of a character in a string Convert an Integer to Character up to 4 digits Remove all characters in a string except alphabets Sort elements in the lexicographical order Convert uppercase string to Jun 18, 2021 · C Language Full Course for Beginners (Hindi) . In C programming, you can create an array of arrays. C program to print all unique elements in array . be/VSEnzzjAm0cDon't forget to tag our Channel!#arrayprogram #sumofarray#clanguage#cp Nov 4, 2022 · Use the following programs to find largest and smallest number from an array using standard method and function in c: C Program to Find Largest Number in an Array using Standard Method; C Program to Find Largest Number in an Array using Function; C Program to Find Largest and Smallest Number in an Array using Standard Method May 22, 2011 · First pad the original array with zeros until its length is a power of two. Example: This example shows the implementation of the above-explained appraoch. Email *. So, if possible, use explicit integer sizes (C99): uint8_t calcMean(uint8_t *buffer, uint16_t height, uint16_t width) {. Accumulate the sum of all elements using the pointer. Here in this post we will continue our learning further and learn to multiply two matrices using pointers. Here, the elements of the array must be entered by the user at run-time. Two-dimensional Array is used in situations where a table of values have to be stored (or) in matrices applications. Declaration of an array: int vector[100]; /* this is an array of 100 ints */ If you want your pointer to point to some of the elements of the array, you can assign it Jan 26, 2023 · Initialize an array arr and a variable sum. Test Cases: (i) (Input-> Array_Name [2,4,5,7,8], Outcome->12) (ii) (Input-> Array_Name [1,2,3,4,5], Outcome->9) 2. 3) sum=0, add each element of the array to the sum value using for loop with the structure for (i=0; i<n;i++) as sum=sum+a [i]. Here, we will develop a program to find sum and average of an array using the pointer in c. This method involves three steps: Divide, Conquer and Combine. Flowchart: 1. 1) Find sum of elements using simple loops. Procedure. Needs to use pointers!!! . You're not doing anything with the result of the recursive arr_sum call. numbers to calculate the average. sum = sum + arr[n]; //make problem smaller. To solve this, we will follow these steps −. pointer. diagonal () method. In this tutorial, you will learn how to write a C program to find sum of array elements. Logic of this program won’t be any different from the program to multiply two matrix using array notation. trace () Syntax : numpy. Jun 7, 2019 · C Programming: Pointers Program in C Programming. Program/Source Code. In this approach, we are using the Lodash _. Here’s the best way to solve it. In the second method, we will use calloc() and free(). In the sum function, declare a pointer ptr of type integer and assign it the address of the first element of the 2D array using &arr [0] [0]. In the first method, we will use malloc() and free(). 2) Write a program in C to compute the sum of all elements in an array using pointers #include stdio. println("The sum is: " + sum); Try it Yourself ». h> void calculateSD(float *data,float *standardDeviation, float *sum, float *average) { int i; for(i=0; i&lt;10 Jan 19, 2017 · The expression &Array[0] would be one way to write that, but most people would instead simply write Array, which is completely equivalent. The method sum should take an int - array as argument and return the sum of all values in all array cells that have an odd index number. . Write a program in C to calculate the factorial of any given number using recursion. double sum = 0; Note that if a method returns double, and sum has type int, you can do return sum. Use the pointer to perform all these operations. Then, we have allocated memory for n number of double values. To store sum of array elements, initialize a variable sum = 0. 8k points) data structure Dec 29, 2020 · I use a function sum to scan the elements of the array and I summed the elements of array. arr[0]+arr[1]+arr[2]+arr[3]+ arr[4]=1+2+3+4+5=15. Question: 3. Visit this page to learn about relationship between pointer and arrays. The following Oct 8, 2021 · When we call the function we shall have to pass the address of these two variables. 8. Consider the program: int* ptr; //declaration of integer pointer int Mar 29, 2023 · Step by Step algorithm : Define a function named sum that takes a 2D array of integers as input and returns an integer value. temp := sum of the values of variable whose addresses are given. Sep 19, 2018 · Name *. scanf("%d", &array[i - 1]); if You want to fill the array from the SIZE-1 to 0 ,just reverse the for loop (for(int i=SIZE-1;i>=0;i--)) int size; If you want to make size as argument when you called your function ,you should initialized it at SIZE(size=SIZE) Sum = Sum + a[rows][rows]; } printf(" The Sum of Diagonal Elements of a Matrix = %d", Sum ); return 0; } In this C Program to find Sum of Diagonal Elements of a Matrix example, We declared single Two dimensional arrays Multiplication of size of 10 * 10. trace () and numpy. // Use a while loop. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type. Mar 26, 2021 · Algorithm. In this c program, we removed extra for loop and calculated the sum and average of array elements using pointer. Mar 30, 2016 · C program to find maximum and minimum element in array using recursion. So let’s see the logic to calculate the sum of the array elements. Below program uses a user defined function getSum. If the array has 6 and 7 in succeeding orders, ignore 6 and 7 and the numbers between them for the calculation of sum. Simple Program; Memory Management; Array of Pointers; Pointer Increment and Decrement; Pointer Dec 3, 2014 · Write a program to print the sum of the elements of the array with the given below condition. Start a for loop from index 0 to the length of the array – 1. In this post, we will look into a C program that computes the sum of array elements using pointers. All Questions › Category: C Language › Develop a program using pointers to compute the sum and standard deviation all elements stored in an array of n real numbers -1 Vote Up Vote Down nikhil. 4 */ 5 int sumArray (int * a, int len , int * sum); C++ Arrays. Then, the data array is accessed using a for loop and each element in the array is printed onto the screen. Program 1: Calculate the sum of Array Elements. Also, you need to declare sum as double. Step 5 − Check, whether the array element is a perfect Apr 7, 2016 · public static double sum2d (double[ ][ ] array2d) { <----- put that in. Sum off all above elements are. sum += num[i]; Once the for loop is completed, the average is calculated and printed on the screen. Create a block of space fo size (size-of-array*sizeof (int)) using malloc () assigning the starting address of this whole space to the pointer variable. Website. Solution. Allocate memory dynamically for N elements. Approach: The idea here is to use Dynamic Memory for searching the largest element in the given array. For example, float x[3][4]; Here, x is a two-dimensional (2d) array. Take a number i. Create a static array of some fixed size, along with element declaration. 4. Sample Input 1: 5 5 7 9 3 1 . Use a pointer to traverse through the array. i. We should initialize the sum variable to 0 . I have already made a program on how t Enter The Size Of Array 5 Enter The Array Elements 8 9 1 5 6 Average Value of An Array Is: 5. num[] array. Nov 4, 2022 · Odd_Sum = Odd_Sum + a[i]; printf(" The Sum of Even Numbers in this Array = %d ", Even_Sum); printf(" The Sum of Odd Numbers in this Array = %d ", Odd_Sum); return 0; The output of the above c program; as follows: The Sum of Odd Numbers in this Array = 9. The problem here is that sum + array2d [row][col]; is a double so can't be assigned back to an int without a cast (but that's not what Apr 18, 2020 · In this video, I am going to explain how to write a program to calculate sum of elements in array in c using pointers. Later display those results to the screen. These arrays are known as multidimensional arrays. define a function solve (), this will take addresses of a and b. Instead of creating 27 separate variables, we can simply create an array: double grade[27]; Here, grade is an array that can hold a maximum of 27 elements of double type. Ask the user to initialize the array size Sep 5, 2020 · Numpy provides us the facility to compute the sum of different diagonals elements using numpy. C Multidimensional Arrays. !👇👇👇https://youtu. If we don't initialize sum as 0, sum will take some garbage value. datatype array_ name [rowsize] [column size]; For example, int a[4] [4]; Dec 29, 2010 · If you're using Java 8, the Arrays class provides a stream(int[] array) method which returns a sequential IntStream with the specified int array. Initialize s = 0 Loop for i = 0 to s = s + *(ptr + i) Print the sum value in variable s. May 21, 2013 · You can either use a temporary variable to hold the return value and print it out or directly use the return value as follows: cout << "Sum of odd integers in the array" << returnArray(x) << endl; When you call a function, simply use the function name and feed it with parameters, you don't need return type anymore (int) in this case. Computer Science. Print the sum. Input:1,2,3,4,5 Output:15 Explanation. For example, Suppose a class has 27 students, and we need to store all their grades. So here will write the C program to find the sum of array elements using recursion. Try your Solution. Set the value of sum=0. This is stored in the variable n. Eg1) Array Elements - 10,3,6,1,2,7,9 O/P: 22 [i. The function should return the sum of the array elements Dec 16, 2017 · How to multiply two matrix using pointers? In previous posts we learned to access a multi-dimensional array using pointer. You also Write a C++ program to find the sum of all the elements of an array using pointers b. Step 4 − Declare a pointer variable. 1+2+3 Nov 21, 2022 · 11:00. 22. Enter the Array Items = 21 31 41 51 61 71 81 91 121. h>. Test Data: Input 5 number of elements in the array: 2 3 4 5 6 Expected Output Dec 7, 2023 · Method 5: Using Lodash _. You can think the array as a table with 3 rows and each row has 4 columns. Write a ‘C’ Program to compute the sum of all elements stored in an array using pointers C Program to compute sum of the array elements C Program to find exponent Power Series !! Program : A program to evaluate the power series x2 x3 xn ex = 1 + x + --- + --- + . Nov 11, 2016 · Arrays a kind of data structure that can store a fixed-size sequential collection of elements of the same type. h void main () int arr1 [10]; int i,n, sum0; int *pt; printf ("Input the number of elements to store in the array (max scanf ("%d", &n); printf " Input %d number of elements in the array : " n) for i-0;i. Find the sum of an array's elements. An array is an object that provides storage for a definite (at compilation time) number of elements, all of them of the same type. Iterate via for loop for reading array elements as input. The array can hold 12 elements. d asked 3 years ago Jul 30, 2019 · Sum of array using pointer arithmetic in C - This is a C++ program to find out sum of array elements using pointer. Problem 3: Write a program in C to compute the sum of all elements in an array using pointers. trace (a, offset=0, axis1=0, axis2=1, dtype=None, out=None) Example 1: For 3X3 Numpy matrix. h> #include <math. To find sum of all elements, iterate through each element and add the current element to the sum. Explanation. Computer Science questions and answers. Next, split the array into two equal parts and store the sum of each. Step 5: Create two inputs, first for taking size of an array from the user and another for loop for taking elements from user. length; i++) {. Share on: Feb 12, 2024 · Add the sum of both half of array to get the sum of whole array. Declare another pointer end of type integer and assign it the address of the C Program to find odd elements occurrences count in array C program to find week day in word from week day in number using two dimentsional array C program to find month in word from month in number using pointers C program to compute PMT for a loan C program to compute EMI and round up using floor C program to compute EMI and round up using Computer Science questions and answers. Write a program in C to compute the sum of all elements in an array using pointers. The question is: write a program in C++ that finds and prints the sum of all elements or numbers in a given array. Sort array in ascending order; Count occurrences of numbers; Store & display prime number; Sort array in descending order; Reverse an array; Print largest sum; Print two dimensional array; Count zeroes in a matrix; Sum of two matrices; Sum of all elements in matrix; Sum of diagonal elements; Find transpose of matrix; Sum of middle row & column Nov 11, 2014 · // A call passing the example array should result in a value of 11. Average = 27. Topic discussed: 1) C program to calculate the sum of elements of an array using the pointers. These numbers are stored in the. Declare a variable to store the sum. We will see the following three programs to add the elements of an array. Conclusion. Suppose we have 5 Elements in array and we want to find there sum. arr[0]=1 arr[1]=2 arr[2]=3 arr[3]=4 arr[4]=5. scanf("%f", &num[i]); And, the sum of each entered element is computed. Input the array elements and store it in arr[i]. In the program, we have asked the user to enter the total number of elements which is stored in the variable n. This program is an example of Dynamic Memory Allocation, here we are declaring memory for N array elements at run time using malloc () - which is used to declare memory for N blocks at run time, we will read N elements, will print them and also print the sum of all elements. This program calculates the average of all the numbers entered by the user. Build a function with a single argument, in which we will pass array argument. Mar 27, 2023 · Count of elements whose absolute difference with the sum of all the other elements is greater than k; Compare sum of first N-1 elements to Nth element of an array; Number of positions such that adding K to the element is greater than sum of all other elements; Count of buttons pressed in a keypad mobile; Count of pairs (x, y) in an array such Using C++. Find sum of array elements using pointer. class Test {. Example 1: Program to find sum of array elements using loops Jul 11, 2015 · Input size and elements in array, store in some variable say n and arr [n]. The below statements ask the User to enter the Matrix size (Number of rows and columns. In this method, we will see how to accept the elements of the array and calculate the total sum of all the elements in the array using a for-each loop. + ---- , 0 < x C Program to Find Sum and Average of an Array Using the Pointer. The final printf statement then prints out the sum of all the elements in the array using the value stored in the variable sum. out. 1. 2) Scanf function reads the entered element and store the element in to the array as a [i] using for (i=0;i<n;i++) loop. USE A WHILE- LOOP! } This is what I have tried so far, but it is not working. 3. Note: sum must be initialized only with 0. The syntax is as follows −. Step 3: Then create a void main function. We will also see how to display the sum of array elements using the recursive method. Write a program in C to compute the sum of all odd elements in an array using pointers. May 18, 2020 · Declaration of a pointer: int *reference; Array. Then, the elements of the array are accessed using the pointer notation. int[] myArray = {1, 5, 10, 25}; int sum = 0; int i; // Loop through the array elements and store the sum in the sum variable for (i = 0; i < myArray. Method 1: Finding the sum of diagonal elements using numpy. Jun 1, 2023 · C Program to Copy All the Elements of One Array to Another Array; C Program to Find Common Array Elements; C Program to Remove All Occurrences of an Element in an Array; C Program To Merge Two Arrays; C Program to Sort the Elements of an Array in Descending Order; C Program to Check Whether a Number Can Be Express as Sum of Two Prime Numbers Mar 8, 2021 · Calculate the sum of all elements of a two-dimensional array by using run-time initialization. Declare a function sum which takes 3 parameters, first is the size, second is array and third is the current index which we are processing right now and it recursively calls itself for the next index until the complete array is traversed. Step 1 − Read number of elements in array at runtime. To correct the program just increase size of the array as array[11]. Save my name, email, and website in this browser for the next time I comment. static int arr[] = { 12, 3, 4, 15 }; Computer Science questions and answers. asked Jul 26, 2019 in Computer by Satkriti ( 69. Aug 3, 2019 · I am required to create a function which calculates the sum of elements on the diagonal of the matrix with signature int diagonal(int array[4][4]) Here's what I've tried: int diagonal(int array[ Mar 27, 2017 · return sum; } else{. Aug 19, 2019 · Sum of all Array elements means add all array Elements. 2) Using recursion. Divide: Divide the array into smaller subarrays until each subarray has only one element. Returns 0, 3 * unless a or sum is NULL , in which case returns -1. C Programming Jul 26, 2019 · Write a C program to rearrange the elements of an array so that those originally stored at odd suffixes are placed, asked Jul 24, 2019 in Computer by Rishi98 ( 69. So, if the input is like a = 5, b = 8, then the output will be a + b = 13 and a - b = -3. EndExample Code Live Demo#include Question: Write a program in C to compute the sum of all elements in an array using pointers Test Data : Input the number of elements to store in the array (max 10) : 5 Input 5 number of elements in the array : element - 1 : 2 element - 2 : 3 element - 3 : 4 element - 4 : 5 element - 5 : 6 Expected Output : The sum of array is : 20 In each iteration of the loop, the user is asked to enter. Traverse the array arr [] to find the Oct 2, 2016 · They get added in an array and the array passed in a function to sum all its elements. Dec 11, 2023 · Sample Output: Pointer : Sum of all elements in an array : ------------------------------------------------ Input the number of elements to store in the array (max 10) : 5 Input 5 number of elements in the array : element - 1 : 2 element - 2 : 3 element - 3 : 4 element - 4 : 5 element - 5 : 6 The sum of array is : 20. Flowchart : C Programming Code Editor: Mar 31, 2023 · Mean of array using recursion; Longest Subarray of non-negative Integers; Sum of array elements using recursion; Sum of even numbers at even position; Find K-Avoiding Array; Sum of consecutive two elements in a array; Find an element in an array such that elements form a strictly decreasing and increasing sequence; Minimum removals to make Nov 28, 2011 · You have problems with your array declaration. In every iteration, perform sum = sum + arr [i]. Question: Write a program in C to compute the sum of all even elements in an array using pointers. Write a function: long solution (int *A, int N) that accepts a pointer to an array of elements and the size of the array. 5. An unsigned char array with a size up to 4294967295 would then require 64bits for the sum. h> void main() { int array[5]; int index; int sum; //Function declaration. Then split the array into quarters and store the sum of each. We first ask the user to specify how many numbers we will be calculating. C Program to Find Sum & Average of n Numbers in Array Question: Write a program in C to read an array containing n numbers and find sum and average of given numbers. 3) Using pointers. You are defining an array of size 10 array[10] and saying the program to calculate the sum of 11 elements which is resulting in memory overflows. The numbers are stored in the float array num, which can store up to 100 floating-point numbers. Inside this function, all the elements of the array are accessed one-by-one, adding to return the sum. Apr 10, 2020 · i dont have yet i just created this function but the question in the book is /* Sums the elements of a, an array of length len , and 2 * writes the sum to where sum references. Python3. sum = 0; 3. Start; Declare the array size. data[2] is equivalent to *(data + 2) and Please Enter the Array size = 9. Also if you wish you can check the recursive approach to find sum of array elements. In this program, the elements are stored in the integer array data[]. It has also been overloaded for double and long arrays. Which is run a loop from 0 to n. Then eighths. Jul 26, 2019 · Write a C program using pointers to compute the sum of all elements stored in an array. Algorithm. #include <stdio. Suppose arr is an integer array of size N (arr[N] ), the task is to write the C Program to sum the elements This article provides a program in C++ to find and print the sum of all elements available in an array. Create a pointer variable, which points to an integer data. The Sum of Array Items = 569. Write a C++ program using recursive function to find the sum to n terms. Get array size n and n elements of array, then compute sum of the elements. Output: The sum of all the elements in the array is 584. In C++, an array is a variable that can store multiple values of the same type. arr_sum(arr,n-1); The output is: 1) In the else -case your function does not return anything, 2) The result of the recursive call is not used at all. Loop through all the elements in the array and add them to variable sum. Input the size of array and store it in the size variable. Jul 18, 2021 · C++ Program to Find the Sum of All Elements in an Array Below is the C++ program to find the sum of all elements in an array: // C++ program to find the sum of elements in an array #include <iostream> using namespace std; // Function to return the sum of elements in an array int findSum (int arr[], int size) { int sum = 0; Access Array Elements Using Pointer. Feb 17, 2023 · Mean of array using recursion; Sum of consecutive two elements in a array; Sum of array elements using recursion; Find K-Avoiding Array; Average numbers in array; Sum of even numbers at even position; Count of arrays in which all adjacent elements are such that one of them divide the another; Subset with no pair sum divisible by K Write a C program to find the sum of N numbers/elements entered by the user using dynamic memory allocation i. Take input from the end-user for the array of numbers, calculate sum and average. data[1] is equivalent to *(data + 1) and &data[1] is equivalent to data + 1. Enter number: 45. sum() Method. Strongly recommended to Solve it on your own, Don't directly go to the solution given below. The Average of Array Items = 63. C Program to find Sum of Even and Odd Numbers in an Array. Step 2 − Input the elements. Program Overview. Sample Output 2: 25. sum() method for getting the sum of all element of an array. // Program to take 5 values from the user and store them in an array // Print the elements stored in the array #include Jul 18, 2022 · Develop a program using pointers to compute the sum, mean and standard deviation of all elements stored in an array of N real numbers Program and Algorithm Computer Science Engineering VTU July 18, 2022 Enter elements: 1 2 3 5 4 You entered: 1 2 3 5 4 In this program, the five elements are entered by the user and stored in the integer array data. } Here code a method called sum. This program allows the user to enter the Size and the row elements of One Dimensional Array. Write a program in C to compute the sum of all even elements in an array using pointers. this is the piece of code: #include <stdio. Oct 16, 2013 · To be at the safe side (on 32 or 64bit machines), consider this: 16bit * 16bit integer would require a 32bit integer (for the dimension). It calculates the sum of an array by splitting They can be used to navigate and manipulate various data structures, including arrays. yo ls po mm nz zm qr nk ir nx