Discussion Forum

  1. Home
  2. »
  3. Languages
  4. »
  5. What will be the output...
What will be the output of the C#.NET code snippet given below?

namespace CompScibitsConsoleApplication
{
    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 ] + " ");
                }
            }
        }
    }
}

0 0 34 34

0 0 17 17

0 0 0 0

17 17 0 0

Answer: A . 0 0 34 34
0Shares
0 0

If you think the posted answer is wrong or Confused About the Answer? Ask for Details Here

Know Explanation? Add it Here
we’ll review your comment and contact you soon….

Leave a Reply

Your email address will not be published. Required fields are marked *

0Shares
0
Scroll to Top