What is stored in mylist after the following c++ code

Assignment Help C/C++ Programming
Reference no: EM13937597

1. Consider the following declaration:

double passwords[100];

In this declaration, identify the following:

a. The array name

b. The array size

c. The data type of each array component

d. The range of values for the index of the array

2. Determine whether the following array declarations are valid. If a declaration is invalid, explain why.

a. string employees[82];

b. int myArray[50];

c. int SIZE

double list[SIZE];

d. int X = 50;

double list[X - 60];

e. int ids [-30];

f. names string[10];

3. Write C++ statements to do the following.

a. Declare an array beta of 20 component of the type double.

b. Initialize each component of the array beta to 0.

c. Output the value of the fifth component of the array beta.

d. set the value of the ninth component of the array beta to 70.50.

e. Set the value of the twelfth component of beta to four times the value of the eighth component of beta minus 15.

f. Use a for loop to output the value of a component of beta if its index is a multiple of 3.

g. Output the value of the last component of beta.

h. Output the value of beta so that ten components per line are printed.

4. What is stored in list after the following C++ code executes?
int list[10];

for (int i=0; i <5; i++)
{
list[i[ - i * i - 5;
if (i % 3 == 0)
list[i] = list[i] + i;
else
list[i] = list[i] - i;
}

5. What is stored in myList after the following C++ code executes?
double myList[5];

myList[0] = 3.0;
myList[1] = 4.0;

for (int i=2; i < 5; i++)
{
myList[i] = myList[i - 1] * myList(i - 2);
if (i > 3)
myyList[i] = myList[i] / 4;

}
Attachment:- wk5C++.zip

Reference no: EM13937597

Questions Cloud

The annual effective interest rate : Cindy borrows 13,500 for 12 years at an annual effective interest rate of i. She accumulates the amount necessary to repay the loan by a sinking fund. Cindy makes 12 payments of P at the end of each year, which includes payment on the loan at an annu..
How can more innovation from suppliers be achieved : What are the four enablers of purchasing and supply chain excellence? Which is the most important according to you? Why? How can more innovation from suppliers be achieved
Set of non-negative integers : The draw for the next soccer season has just been released. There are 6 teams in the competition and in the first 3 rounds the following teams have been drawn to play each other.
What is the company expected growth rate : Kahn Inc. has a target capital structure of 50% common equity and 50% debt to fund its $10 billion in operating assets. Furthermore, Kahn Inc. has a WACC of 14%, a before-tax cost of debt of 11%, and a tax rate of 40%. What is the company's expected ..
What is stored in mylist after the following c++ code : Set the value of the twelfth component of beta to four times the value of the eighth component of beta minus 15.
Write c program to find the number of occurrences of a word : Write C program to find the number of occurrences of a word from a file given in a specified path. For this you need to give your text file path with some text, and specify the word for which you need to find the frequency.
Replaced to get the current ratio to the target level : Muscarella Inc. has the following balance sheet and income statement data: Cash $ 14,000 Accounts payable $ 42,000 Receivables 70,000 Other current liabilities 28,000 Inventories 210,000 Total CL $ 70,000 Total CA $294,000 Long-term debt 70,000. Assu..
Calculate the return on equity for mm : Mighty Motors has no preferred stock. Calculate the return on equity (ROE) for MM for 2008. Make sure you use average shareholders' eq­ uity in your calculation.
Find the size of the multiplier in this economy : Explain why a group of economist thinks that a common currency like Euro for the region is not a good idea. Restrict your answer to the concepts discussed in the class and the case study. Page limit is one page.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd