Given the following function, indicate the line or lines (if…
Given the following function, indicate the line or lines (if any) that have a problem. The problem could be a syntax error (will not compile) or a semantic error (will not execute correctly). In other words, which lines require changes to correct the issue(s), if any? // Given an array and a vector of integers, merge both into a single array// that is exactly the size of the two separate containers combined// Parameters:// data1 – the array// count – the number of elements in the array// data2 – the vector of integers1 int* MergeValues(int* data1, unsigned int count, vector& data2)2 {3 // Allocate space for the new array4 int* newArray = new int[count * data2.size()];5 6 // Copy the array first7 for (unsigned int i = 0; i
Read DetailsGiven the following: void Foo(){ const int elementCount = 3;…
Given the following: void Foo(){ const int elementCount = 3; string* strings = new string[elementCount]; int numbers[elementCount]; for (int i = 0; i < elementCount; i++) { numbers[i] = rand() % 100; cin >> strings[i]; } delete[] strings;} How many stack variables are created in this function?
Read Details