Question: Find and correct the error in each of the following code segments: a) const int ArraySize = 5; ArraySize = 10; b) Assume var b
Find and correct the error in each of the following code segments:
a) const int ArraySize = 5;
ArraySize = 10;
b) Assume var b = new int[10];
for (var i = 0; i <= b.Length; ++i)
{
b[i] = 1;
}
c) Assume int[,] a = {{1, 2}, {3, 4}};
a[1][1] = 5;
Step by Step Solution
3.24 Rating (170 Votes )
There are 3 Steps involved in it
a Error Assigning a value to a constant after i... View full answer
Get step-by-step solutions from verified subject matter experts
