Home / C# Programming / Arrays - C# :: Discussion

Discussion :: Arrays - C#

  1. What will be the output of the C#.NET code snippet given below?

    namespace FreshergateConsoleApplication 
    {   
        class SampleProgram   
        {    
            static void Main(string[ ] args)     
            {            
                 int i, j;          
                 int[ , ] arr = new int[ 2, 2 ];             
                 for(i = 0; i 2; ++i)        
                 {          
                    for(j = 0; j 2; ++j)                 
                    {             
                       arr[i, j] = i * 17 + i * 17;                     
                       Console.Write(arr[ i, j ] + "");                 
                    }          
                }        
            }    
         }
     }

     

     

  2. A.

    0 0 34 34

    B.

    0 0 17 17

    C.

    0 0 0 0

    D.

    17 17 0 0

    E.

    34 34 0 0

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    No answer description available for this question.


Be The First To Comment