create array c 2b 2b

Solutions on MaxInterview for create array c 2b 2b by the best coders in the world

showing results for - "create array c 2b 2b"
Hannes
02 Jul 2020
1#include <iostream>
2using std::cout;
3
4int a[] = { 1, 2, 3, 4, 5 };
5int counta()
6  {
7  return sizeof( a ) / sizeof( a[ 0 ] );  // works, since a[] is an array
8  }
9
10int countb( int b[] )
11  {
12  return sizeof( b ) / sizeof( b[ 0 ] );  // fails, since b[] is a pointer
13  }
Ema
15 Jan 2019
1int foo [] = { 16, 2, 77, 40, 12071 };
Lola
21 Apr 2018
1int foo [5];
Melina
10 May 2017
1void initarr(int arrgender[TOT_MALE][TOT_FEMALE])
2  {
3      for(int a =0; a < TOT_MALE;a++)
4      {
5          for(int b = 0; b < TOT_FEMALE;b++)
6          {
7              arrgender[a][b] = 0;
8          }
9      }
Domenico
16 Feb 2020
1int arr[3] = {1, 5, 4};
Benjamín
26 Apr 2020
1int foo[5] = {0};
similar questions
queries leading to this page
create array c 2b 2b