answersLogoWhite

0

Take another array big enough to hold both array copy content of these two array into new one. You merged two array and haven't used a single function.!

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Engineering

How is an array name interpretedwhen it is passed to a function?

An array is still an array, regardless of how you pass it into functions. It is still an array-type variable at the beginning of a function. However, the function itself may manipulate the array by "imploding" it into a string with a delimiter, using array values with only specific keys, and such.


Is it possible to print matrix without using array?

Yes but why.


How do you work out the biggest number in an array without using the max function in Python 3?

To find the biggest number in an array without using the max function, you can initialize a variable to hold the largest number, typically starting with the first element of the array. Then, iterate through the array using a loop, and for each element, compare it with the current largest number. If the current element is greater, update the largest number. Finally, after the loop, the variable will contain the largest number in the array. Here’s a simple example: arr = [3, 5, 2, 9, 1] largest = arr[0] for num in arr: if num > largest: largest = num print(largest) # Output: 9


How do you count the number of elements in an array using PHP?

Using the function "count". <?php $foo = array("John", "Jacob", "Jingleheimer", "Schmidt"); echo count($foo); // <-- outputs the number 4 ?>


How do you print array variable without using array subscripts?

Well the most prolific answer to this query would be the use of pointers.Use a pointer and allocate it to the array of interest and start printing.

Related Questions

Sorting an array in PHP without using sort function?

plz as soon as possible give me the program for shorting an array in asscending order without using any sort function in c++


How do you flip an array without using flip function in PHP?

Use a for-loop starting at the length of the array and go backwards and build up a new array with the values.


Is it possibly to return an array of strings in a function without using pointers in C plus plus?

No.


How do you merge and sort an array using PHP?

To merge and sort an array in PHP you need to use the array_merge() and sort() functions like shown in the example below: <?php $array1 = array(1, 5, 3, 9, 7); $array2 = array(8, 2, 6, 4, 0); // merge the arrays $merge = array_merge($array1, $array2); // 1, 5, 3, 9, 7, 8, 2, 6, 4, 0 // sort the array sort($merge); // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ?>


How can you find factorial of each element in array using pointer?

To find the factorial of each element in an array using pointers in C, you can create a function that takes a pointer to the array and its size as parameters. In the function, iterate through the array using pointer arithmetic, calculating the factorial for each element and storing the result back in the same array or a separate array. For calculating the factorial, you can use a simple loop or recursion. Finally, print or return the modified array with the factorials.


How is an array name interpretedwhen it is passed to a function?

An array is still an array, regardless of how you pass it into functions. It is still an array-type variable at the beginning of a function. However, the function itself may manipulate the array by "imploding" it into a string with a delimiter, using array values with only specific keys, and such.


Is it possible to print matrix without using array?

Yes but why.


How do you work out the biggest number in an array without using the max function in Python 3?

To find the biggest number in an array without using the max function, you can initialize a variable to hold the largest number, typically starting with the first element of the array. Then, iterate through the array using a loop, and for each element, compare it with the current largest number. If the current element is greater, update the largest number. Finally, after the loop, the variable will contain the largest number in the array. Here’s a simple example: arr = [3, 5, 2, 9, 1] largest = arr[0] for num in arr: if num > largest: largest = num print(largest) # Output: 9


How do you count the number of elements in an array using PHP?

Using the function "count". <?php $foo = array("John", "Jacob", "Jingleheimer", "Schmidt"); echo count($foo); // <-- outputs the number 4 ?>


What is the best way to write an array to a file in PHP?

The serialize() function is used to create a storable representation of a variable in PHP.To store an array to a file, you first use the serialize() function to change an array into a string. Save the string in a file using file I/O, so fwrite() or a similar function. When reading it use unserialize() to get the original array again.


What does array combine function do in php?

Creates an array using one value for keys and other for its values http://php.net/manual/en/function.array-combine.php


How do you print array variable without using array subscripts?

Well the most prolific answer to this query would be the use of pointers.Use a pointer and allocate it to the array of interest and start printing.