Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

 Answer the following questions about the following initialized: 

                 Dim strPacificCapitals(11) As String

 

a.      Assign Apia to the first array location. What is the index number?

b.      Assign Honiara to the fourth location in the array. What would the assignment statement looks like?

c.      What value does strPacificCapitals.Length have?

d.      How many capitals can this array hold?

e.      What would happen if you assigned strPacificCapitals(11) = “Port Vila”?

 

1) Write a procedure that will compute and return the average of three numbers. The procedure should have three parameters of type double representing the numbers to be averaged. (for example the average of x, y and z is given by (x+y+z)/3.0) 

2) what is the output of the following code? 

Private Sub btnBedrockClick(ByVal sender As System.Object, ByVal e As System.EventArgs)

   Dim strFullName As String = “Jonah Lomu”

   Dim strSecondName As String = “Va’inga Tuigamala”

   CountLength(strFullName, strSecondName)   lblEnd.Text = “My favorite was ” & strSecondName

End Sub

Private Sub CountLength(ByVal strFullName As String, ByRef strSecondName As String)

   lblFirst.Text = “The first name has ” & strFullName.Length & “ letters.”   lblSecond.Text = “The second name has ” & strSecondName.Length & “ letters.”

   strSecondName = “Joe Rokocoko”

End Sub

 


 

Write a simple C program that accepts user input for the following:

The total number of test items, and the percentage of correct answers. For every correct answer, a student gets five (5) points and loses two (2) points for every wrong answer.


Where's the Biggest One?



by CodeChum Admin




We've already tried comparing 3 numbers to see the largest among all, so let's try a more complicated mission where we locate the position of the largest among 5 numbers. There are only 4 possible cases for this mission:




- if the largest digit is the first digit, print "Leftmost"




- if the largest digit is the third digit, print "Middle"




- if the largest digit is the last digit, print "Rightmost"




- if none of the above is correct, print "Unknown"







Now, show me how far you've understood your lessons!




Input




A line containing a five-digit integer.




1·4·6·3·2



Output




A line containing a string.




Middle

Write a program that contains a function that displays “Welcome to CS127-8L!” Then, it asks for a double value such as 25.36, 100.02 etc. The maximum is 1000. Getting the double value must be done in a function as called by the main function. Then the main function displays the value in words.


Mr. Hari has bought 10 items from the shop. He has stored the price of all the items in an array. Help




Mr. Hari to print the sum of the even items in the array

Write a For Each loop that displays every element of an array named strSongNames in a ListBox named lstDisplay. The loop variable is named strPlay


Rewrite the following code to read each line of a text file into an array named strFordModel. Just write the correct codeDo While objReader.Peek = -1 strFordModel(intCount) = objReader.ReadLine intCount += 1 Loop

Write a program that contains a function that displays' Welcome to CS127-8L!" Then, it asks for a double value such as 25.36, 100.02 etc. The maximum is 1000. Getting the function displays the value in words. Please see the sample runs below.

Run 1

Welcome to CS127-8L!

Enter a double value: 255.36

That is two hundred twenty-five and thirty-six centavos!


Run 2

Welcome to CS127-8L!

Enter a double value: 800.20

That is eight hundred and twenty centavos!


This program is supposed to write 100 99 98 3 2 1, but it probably does not. What is the program doing that is incorrect? (We're not asking you explain why the incorrect action leads to the particular outcome it does, and we're not asking you to propose a fix to the problem.)
    #include <iostream>
    using namespace std;
    int* nochange(int* p)
    {return p;
    }
    int* getPtrToArray(int& m)
    {
        int anArray[100];
        for (int j = 0; j < 100; j++)
            anArray[j] = 100-j;
        m = 100;
        return nochange(anArray); }
    void f()
    {int junk[100];
        for (int k = 0; k < 100; k++)
            junk[k] = 123400000 + k;
        junk[50]++;
    }
    int main()
    { int n;
        int* ptr = getPtrToArray(n);
        f();
        for (int i = 0; i < 3; i++)
            cout << ptr[i] << ' ';
        for (int i = n-3; i < n; i++)
            cout << ptr[i] << ' ';
        cout << endl;}





LATEST TUTORIALS
APPROVED BY CLIENTS