What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-10-29 08:47:18
c++ get last element in array
#include<iostream> /*To get the last element of the array we first get the size of the array by using sizeof(). Unfortunately, this gives us the size of the array in bytes. To fix this, we divide the size (in bytes) by the size of th... Add solution -
Java 2021-10-26 20:55:07
length of array in java
/** * An Example to get the Array Length is Java */ public class ArrayLengthJava { public static void main(String[] args) { String[] myArray = { "I", "Love", "Music" }; int arrayLength = myArray.length; //array length attribu... Add solution -
C++ 2021-10-22 19:36:12
pass by address array in c++
#include <iostream> using namespace std; // function declaration: double getAverage(int arr[], int size); int main () { // an int array with 5 elements. int balance[5] = {1000, 2, 3, 17, 50}; double avg; // pass pointer to the array ... Add solution -
TypeScript 2021-10-14 13:59:04
Find common elements from three sorted arrays
public static void main(String[] args) { ArrayList<Integer> common = new ArrayList<Integer>(); int array1[] = {2, 4, 8}; int array2[] = {2, 3, 4, 8, 10, 16}; int array3[] = {4, 8, 14, 40}; int x = 0, y... Add solution