Question: #include #include static int n = 5; int dotProduct(int A[], int B[], int len) { // calculate the dot product //return the final answer return
#include
#include
static int n = 5;
int dotProduct(int A[], int B[], int len) {
// calculate the dot product
//return the final answer
return product;
}
int main (int argc, char** argv) {
//declare A and B here, using the initial values
int [] A = {5,4,3,2,1}
int [] B = {1,2,3,4,5}
//print both arrays using the printArray(int v[]), int n)
int dp = dotProduct(A, B, n);
//print the dp to the screen
return 1;
}
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
