Search
int arr[10]; int n = 5; char vars[n]; float coeffs[] = {4.2, 0.12, 8.7773};
Write a program which will calculate the dot product of two vectors (arrays). Each array should contain 3 elements. You should code the values for one of the elements, and prompt the user at run-time for the values of the second. When you have this in place, THEN alter your code to make use of a function which takes two arrays, and returns the dot product.
Create a separate function in your code to calculate the dot product. You should use pointers inside your function.
Using your existing code as a base, ask the user for 9 numbers. Construct a 2D array (3×3) to store these in.
Calculating the resulting matrix from multiplying this 2D array with the other vector.