Question
this is done in C# 1.Using the following declaration: int [ ] anArray = {34, 55, 67, 89, 99}; WriteLine(anArray.Length); a call to the WriteLine(
this is done in C#
1.Using the following declaration: int [ ] anArray = {34, 55, 67, 89, 99}; WriteLine(anArray.Length); a call to the WriteLine( ) method would display _____________.
2.Using the following declaration: int [ ] anArray = {34, 55, 67, 89, 99}; WriteLine(anArray[anArray.Length 2]); a call to the WriteLine( ) method would display ____________,
3.Using the following declaration: int [ ] anArray = {34, 55, 67, 89, 99}; WriteLine(anArray[1] + 100); a call to the WriteLine( ) method would display ____________,
4.Using the following declaration: int [ ] anArray = {34, 55, 67, 89, 99}; WriteLine(anArray[2 + 1] * anArray[0]); a call to the WriteLine( ) method would display ____________,
5.
Assume you have a method heading that reads
public static void DoSomething (int [ ] temp)
A call to invoke the method sending in the array would look like:
______________________________________
HINT: Your declaration must be syntactically correct, complete with an ending semicolon.
6._____________ would create an array declaration and do a compile-time initialization to hold the 5 most common single character middle initials. The most common are A, N, R, S and T. Use middleInitial as your identifier.
7.
Using the following declarations and a member of the Array class, int [ ] bArray = new int [10]; int location; Using a method of the Array class, write an assignment statement that would return the index in the bArray array where 14 is stored.
__________________________
8.
Using the following declarations and a member of the Array class, int [ ] bArray = new int [10]; int location; Using a method in the Array class, write a statement that would change the order of the elements in the bArray array. The contents of the first cell should hold what was in the last cell. The second cell should hold what was in the next to last cell.
__________________________
9.
Using the following declarations, int counter = 0; double val; double [ ] bArray = new double [10]; To display the contents of bArray, show what the foreach loop control construct would resemble.
______________
10.
Using the following declarations and a member of the Array class, int [ ] bArray = new int [10]; int location; Using a method in the Array class, write a statement that would order the values in the bArray array in ascending order.
___________________
11.Using the following declaration: int [ ] anArray = {34, 55, 67, 89, 99}; WriteLine(anArray[2]); a call to the WriteLine( ) method would display ____________,
12.
Using just the following declarations, int counter = 0; int val; int [ ] bArray = new int [10]; Write the body of the for loop that could be used to increment each element in bArray by 5. The for loop might loop like:
for (counter = 0; counter < bArray.Length; counter++)
__________________
13._____________ would create an array declaration to hold the names of five font strings. Use font as your identifier. HINT: Your declaration must be syntactically correct, complete with an ending semicolon.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started