c++ ##_##
Arrays are not available in C#.NET
An array is a group of similar data elements.
We can create an array for integers, doubles, bytes, strings, etc.
In C#.Net, Array is a predefined class.
Options:
Correct answer: 3
B, C, and D
B, C and D are correct about arrays in C#.
数组在C#.NET中不可用
数组是一组相似的数据元素。
我们可以为整数,双精度数,字节,字符串等创建一个数组。
在C#.Net中,数组是预定义的类。
选项:
正确答案:3
B,C和D
B,C和D关于C#中的数组是正确的。
Correct answer: 1
Yes
Yes, we can create an array of objects in C#.NET.
char []ch = { 'A', 'C', 'D', 'E'};
char ch[] = { 'A', 'C', 'D', 'E'};
char ch{} = { 'A', 'C', 'D', 'E'};
char ()ch = { 'A', 'C', 'D', 'E'};
Options:
Correct answer: 1
A
char []ch = { 'A', 'C', 'D', 'E'}; is the correct way to declare and initialize an array of characters.
char [] ch = {'A','C','D','E'};
char ch [] = {'A','C','D','E'};
char ch {} = {'A','C','D','E'};
char()ch = {'A','C','D','E'};
选项:
正确答案:1
一个
char [] ch = {'A','C','D','E'}; 是声明和初始化字符数组的正确方法。
int []arr = {5,0,10,20,4};
It is not a proper way to create an array.
Here we are creating an array of 5 integer elements.
Here arr is a reference to the array created on the stack.
We need to use curly braces to create an array in C#.NET.
Options:
Correct answer: 2
Only B
Only B is the correct statement about given code snippets.
这不是创建数组的正确方法。
在这里,我们创建了一个由5个整数元素组成的数组。
这里arr是对在堆栈上创建的数组的引用。
我们需要使用花括号在C#.NET中创建一个数组。
选项:
正确答案:2
只有B
关于给定的代码段,只有B是正确的语句。
Correct answer: 1
Yes
Yes, we create a jagged array in C#.NET, in jagged array row size may differ from each other in the matrix.
翻译自: https://www.includehelp.com/dot-net/csharp-arrays-aptitude-questions-and-answers-1.aspx
c++ ##_##