IN C#, which of the following statements correctly instantiates an array which is defined as a string type array with three elements:
string[] myArray = new string[] {“1”, “Smith”, “3.5”}; |
||
string myArray = new string[3] {“1”, “Smith”, “3.5”}; |
||
string[] myArray = new string[3]; |
||
string myArray = new string[3] {1, “Smith”, 3.5}; |
||
None of the above |
string[] myArray = new string[] {“1”, “Smith”, “3.5”}; |
Get Answers For Free
Most questions answered within 1 hours.