1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
enot [183]
3 years ago
10

"assignment is to create a program that will read a value from an array, and then place this value in another array with the loc

ation shifted by a certain amount. The array may be of any length from 2 to 100. Your program must be flexible enough to produce the correct solution regardless of the array size"
Computers and Technology
1 answer:
White raven [17]3 years ago
5 0

Answer:

#include <iostream>//including libraries

using namespace std;

int main()

{

int arr[6] = { 0,1,2,3,4,5 };//make sure size of arr is 1 less than secArr

int secArr[7];//second array (1 element bigger)

for (int i = 0;i < 6;i++)//looping through each element (6 times)

{

 secArr[i + 1] = arr[i];//transferring elements to second array and shifting by 1 cell

 cout << secArr[i + 1] << endl;//printing elements of second array

}

return 0;//terminating program

}

Explanation:

The array size can range from any number. just make sure to keep arr one less than secArr. This is because we need the room for the extra element. This task is to help you understand how array work and how to parse through them using loops. For loops are the best for this task because even if you think intuitively, they work for as long as there are items in the array. and you can define the size yourself.

You might be interested in
The most effective technique of malware propagation among the following list
iVinArrow [24]

Question Completion with Options:

A. Embedding & packing malcode in application programs

B. Replacing the Import-Address-Table (IAT)

C. Appending & prepending malcode into application programs

D. Embedding malcode in documents, such as MS O Office & PDF

Ε. Replicating malcode's source code

Answer:

The most effective technique of malware propagation among the following list is:

A. Embedding & packing malcode in application program

Explanation:

Malware propagation becomes effective and replicates effortlessly when malicious codes (otherwise called malcodes, which are self-replicating malicious programs) are embedded and packed in application programs.  These usually take many years before they start to manifest, making them very difficult to detect.  They are often triggered by some set events.  Given the nature of malcodes and the culprits behind them, they are very dangerous to applications and pose substantial business risks.

6 0
3 years ago
Help with this chart please
Hunter-Best [27]

Well GPS works by sending a signal into space that gets a satellite to pin you on earth. So if you trying to turn off the ringer wile in school you would have to make a app that gets the satellite to pin you on the map then say if your in school or in like a 5 mile radius of your school to tell the app to turn off your ringer on your phone.


Your app would need;



Your Schools location, Your location, Your ringer state(On/Off), And it would need if you have school they day(Like on the weekend).

Then you just have to put it together

8 0
3 years ago
What does Al stand for?
prohojiy [21]
AI stands for Artificial Intelligence
5 0
3 years ago
When did time begin?
hram777 [196]

I love Rakshya please accpect ma propoese

7 0
2 years ago
The processing power of a computing device is measured by its _____.
Scilla [17]

Answer:

china

Explanation:

8 0
3 years ago
Other questions:
  • In procedural programming, where does the flow of control usually route from the main function?
    8·1 answer
  • Which best defines the term patch?
    12·1 answer
  • Clearing the computer's cache helps store recently-used information.<br><br> True<br> False
    10·2 answers
  • How do I learn coding??? ​
    5·2 answers
  • Some numbers are formed with closed paths. the digits 0, 4, 6 and 9 each have 1 closed path and 8 has 2. None of the other numbe
    6·1 answer
  • The elements in a long array of integers are roughly sorted in decreasing order. No more than 5 percent of the elements are out
    12·1 answer
  • How many total cells can a worksheet window contain? If columns are labelled alphabetically, what will be the label for the cell
    15·1 answer
  • Plz help Complete the sentence.
    11·2 answers
  • Write a user input program that simulates a game of a rolling pair of dice. You can create/simulate rolling one die by choosing
    10·1 answer
  • What is the answer in music class
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!