Printing out 2-D array after passing it through a function
<pre><code>void shiftString(int ,char stringinput[]);
void createTable(char table[][26]);
int main()
{
   char array[26][26]={1};  //initialize array
   createTable(array);   //function which takes 2-D array and feeds values into it
   return 0;
 }
 void shiftString(int n,char stringinput[])    
 {
  //this function shifts the characters in the string left or right by n.left if n is
    negative and vice versa.I have to use this to shuffle the characters 'A' to 'Z'
    in each row.
 }
 void createTable(char table[][26])  //this function creates a 26x26 matrix 
 {
     int n=0;
     int count=0;
     for (int i=0;i&lt;26;i++)    //loop for row of matrix
     {   
          char array1[26]=  {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','X','W','Y','Z'};  //initializing 1-D array
      shiftString(n,array1);  //moves back every character by n. 
      for (int j=0;j&lt;26;j++)//this loop equals one row of 2-D array to 1-D array
      {
          table[i][j]=array1[count];
          count++;
      }

       n--;  //everytime moving back of character increases by 1
   }
   for (int a=0;a&lt;26;a++) //these two loops print out the array
   {
       for (int b=0;b&lt;26;b++) //26 is the size of rows and columns
       {
           cout&lt;&lt;table[a][b]&lt;&lt;" ";
       }  
       cout&lt;&lt;endl;
   }
   }
</code></pre>

<p>I am passing an array with unknown length into a function.The function puts 'A' to 'Z' characters into it.Now in this function,i am using another function made by myself(tested before and works perfectly fine).Now when I try to print the array it is something like this:</p>

<pre><code>    M N O P Q R S T U V X W Y Z      ü ¥ R · ô ? ~ ·
    h a ¨ ¿    ¤ ^ ¨ ¿  Ì | · w ù p · w ù p ·
    o · A B C D E F G H I J K L M N O P Q R S T U V X W
    Y Z      ü ¥ R · ô ? ~ · h a ¨ ¿    ¤ ^ ¨ ¿
    Ì | · w ù p · w ù p ·   o · A B C D E F G H I J
    K L M N O P Q R S T U V X W Y Z      ü ¥ R · ô ?
    ~ · h a ¨ ¿    ¤ ^ ¨ ¿  Ì | · w ù p · w ù p ·
    o · A B C D E F G H I J K L M N O P Q R S T U V
</code></pre>

<p>what is the problem?Am i initializing the arrays correctly?I tried to print it out in the main code but same problem.</p>
