Search Placementyogi.com
 

C# Arrays - Advanced Objective Questions

1

Which of the following statements is correct about the array declaration given below?

int[][][] myArray = new int[2][][];
A.

myArray refers to a 3-D jagged array containing 2 2-D jagged arrays.

B.

myArray refers to a 3-D jagged array containing three 2-D jagged arrays.

C.

myArray refers to a 3-D jagged array containing 2 2-D rectangular arrays.

D.

myArray refers to a 2-D jagged array containing 2 rows.

E.

myArray refers to a 2-D jagged array containing 3 rows.

See Answer & Explanation Lets Discuss
Correct answer is : A
Explanation

No explanation available. Let's Discuss

 
2

What is the output of the following C# program?

using System;
namespace PlacementYogi
{
    class Arrays
    {
        public static void Main(String[] args) 
        {
            int[, ,] myArray = new int[3, 2, 4];
            Console.WriteLine(myArray.Length);
        }
    }
}
A.

9

B.

18

C.

24

D.

27

E.

None of the above

See Answer & Explanation Lets Discuss
Correct answer is : C
Explanation

No explanation available. Let's Discuss

 
3

What is the output of the following C# program?

using System;
namespace PlacementYogi
{
    class Arrays
    {
        public static void Main(String[] args) 
        {
            int i, j;
            int[,] myArray = new int[2, 2];
            for (i = 0; i < 2; ++i)
            {
                for (j = 0; j < 2; ++j)
                {
                    myArray[i, j] = i * 15 + i * 20;
                    Console.Write(myArray[i, j] + " ");
                }
            }
        }
    }
}
A.

0 0 15 20

B.

0 0 35 35

C.

35 35 0 0

D.

0 0 0 0

E.

None of the above

See Answer & Explanation Lets Discuss
Correct answer is : B
Explanation

No explanation available. Let's Discuss

 
 

Banner to LogicGuns.com

Hide Page Information

C# Arrays - Advanced Objective Questions and Answers with Explanation

Here you can find advanced level C# arrays interview questions with answers and explanation.

Why Arrays in C#?

In this section you can learn and practice different types of advanced level questions with answers on arrays to improve your skills in order to face the interviews, competitive examinations and various entrance tests (CAT, GATE, GRE, MAT, Bank Exam etc.) with full confidence.

Where can I get C# Arrays Advanced Questions and Answers with Explanation?

PlacementYogi provides you lots of fully solved advanced level arrays questions and answers with explanation. Fully solved examples with detailed answer description, explanation are given and it would be easy to understand. All students, freshers can download Operators quiz questions with answers as PDF files and eBooks.

Where can I get Advanced Level C# Arrays Interview Questions and Answers (objective type, multiple choice)?

Here you can find objective type advanced arrays questions and answers for interview and entrance examination. Multiple choice and TRUE or FALSE type and YES or NO type questions are also provided.