Predict the output for the below program
static void Main()
{
int [] array1 = { 11, 12, 13, 14, 15 };
int [] array2 = new int [10];
array1.CopyTo(array2,3);
foreach ( int i in array2)
Console.Write(i + " " );
}
Select one:
0 0 0 11 12 13 14 15 0 0
13 14 15
11 12 13
15
Answers
Answered by
0
Explanation:
अगर कोई आंसर नहीं देता तो उसके मुंह पर मार दो नहीं देता तो उन पर मार दो किताब पढ़ लो थोड़ा सा
Answered by
0
Answer: 14 15
Explanation:
Given :
static void Main()
{
int [] array1 = { 11, 12, 13, 14, 15 };
int [] array2 = new int [10];
array1.CopyTo(array2,3);
foreach ( int i in array2)
Console.Write(i + " " );
}
To find : Output of the program
Solution : Elements in array1 are : 11, 12, 13, 14, 15
Elements copied in array2 are : 14, 15
∵ CopyTo(destination, index)
where, destination is the destination array
index is the starting index
∴ It will print : 14 15
Similar questions
Math,
5 days ago
Social Sciences,
9 days ago
English,
7 months ago
Math,
7 months ago
Math,
7 months ago