What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-02-02 17:45:33
array declaration c++
#include <iostream> using std::cout; int a[] = { 1, 2, 3, 4, 5 }; int counta() { return sizeof( a ) / sizeof( a[ 0 ] ); // works, since a[] is an array } int countb( int b[] ) { return sizeof( b ) / sizeof( b[ 0 ] ); // fails, since b[... Add solution -
Python 2022-01-22 13:45:02
java to python converter online
import java.util.*; class D { public static void main(string args[]) } int a[]=new int[5]; int b[]=new int[5]; Scanner kb=new Sacnner(System.in; for(intcj=0;j<=2;j++) { a[j]=kb.nextInt(); for(int k=0;k<=2;k++) } b[k]=kb.nextInt(); } int r1=a[2]; int... Add solution -
C++ 2021-11-15 22:49:16
passing multidimentional array pointers in c++ to functions
#include<iostream> using namespace std; void processArr(int a[][2]) { cout << "element at index 1,1 is " << a[1][1]; } int main() { int arr[2][2]; arr[0][0] = 0; arr[0][1] = ... Add solution -
C++ 2021-11-13 05:16:11
how to pass arrays by reference c++
#include <iostream> using namespace std; void show( int *num) { cout<<*num; } int main() { int a[] = {3,2,1,6,7,4,5,0,10,8}; for (int i=0; i<10; i++) { show (&a[i]); &nb... Add solution
Best helpers
Ranking is empty