subject

#include using namespace std;
const int SIZE 4;
void printArray(int list[], int arraySize);
void reverse(const int list[], int newList[], int size)
{
for (int i = 0, j = size - 1; i < size; i++, j--)
{
newList[j] = list[i];
}
}
void p(const int list[], int arraySize)
{
list[0] = 100;
}
int main()
{
SIZE = 4;
int newList[SIZE];
int numbers[] = {1, 4, 3, 6, 8};
p(numbers, 5);
printArray(numbers, 5);
reverse(list, newList, SIZE);
printArray(newList, SIZE);
return 0;
}
void printArray(int list[], int arraySize)
{
for (int i = 0; i < arraySize; i++)
{
cout << list[i] << " ";
}
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:00
What is the worst-case complexity of the maxrepeats function? assume that the longest string in the names array is at most 25 characters wide (i.e., string comparison can be treated as o( class namecounter { private: int* counts; int nc; string* names; int nn; public: namecounter (int ncounts, int nnames); int maxrepeats() const; }; int namecounter: : maxrepeats () { int maxcount = 0; for (int i = 0; i < nc; ++i) { int count = 1; for (int j = i+1; j < nc; ++j) { if (names[i] == names[j]) ++count; } maxcount = max(count, maxcount); } return maxcount; }
Answers: 3
question
Computers and Technology, 23.06.2019 23:30
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
Answers: 1
question
Computers and Technology, 24.06.2019 10:30
Which of the following types of software is most applicable to the promotion of new products through advertising? a.databases b. spreadsheets c. web design programs d. word processing tools
Answers: 2
question
Computers and Technology, 24.06.2019 23:30
True or false when a host gets an ip address from a dhcp server it is said to be configured manually
Answers: 1
You know the right answer?
#include using namespace std;
const int SIZE 4;
void printArray(int list[], int array...
Questions
question
Chemistry, 21.08.2019 11:00
Questions on the website: 13722361