title: Two-dimensional array for decoding binary-decimal
body: <p>Well simply put l need  to create  2d array using 0 and 1 then  each row  decode from binary form to decimal (array is a[5][8]). My idea is to use pointer for each row (would have 5 void function but l had problem with first so l stopped). All l get is some random number instead of simple array. Can anyone tell me where is my mistake ?  Here is  my code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;time.h&gt;
  void VredBajt(int a[5][8],int *pb)
  {
   for(int i=0;i&lt;5;i++)
     {
      for(int j=0;j&lt;8;j++)
      {
          pb=&amp;(a[0][j]);
          pb++;
      }}}
  
  int main()
  {
     int a[5][8],i,j,pb;
     srand(time(0));
     for(i=0;i&lt;5;i++)
     {
      for(j=0;j&lt;8;j++)
      {
          a[i][j]=rand()%(2);
      }
     }
     for(i=0;i&lt;5;i++)
     {
      printf("\n");
      for(j=0;j&lt;8;j++)
      {
          printf("%3d",a[i][j]); 
      }
     }
  
      VredBajt(a,&amp;pb);
      printf("\n\n %5d",pb);
  }
  </code></pre>