Given Information:
Three different functions are given:
Function-1:
/*clear1 function with a pointer variable and integer as arguments */
void clear1 ( point *p, int n)
{
//variable declaration
int i,j;
//traverse throughout the structure
for(i=0;i<n;i++)
for(j=0;j<3;j++)
//multiply the point with velocity
p[i].vel[j]=0;
for(j=0;j<3;j++)
//multiply the point with acceleration
p[i].acc[j]=0;
}
}
Function-2:
/*clear2 function with a pointer variable and integer as arguments */
void clear2 ( point *p, int n)
{
//variable declaration
int i,j;
//traverse throughout the structure
for(i=0;i<n;i++)
for(j=0;j<3;j++)
//multiply the point with velocity
p[i].vel[j]=0;
//multiply the point with acceleration
p[i].acc[j]=0;
}
Function-3:
/*clear3 function with a pointer variable and integer as arguments */
void clear3 ( point *p, int n)
{
//variable declaration
int i,j;
//traverse throughout the structure
for(j=0;j<3;i++)
for(i=0;i<n;j++)
//multiply the point with velocity
p[i].vel[j]=0;
for(i=0;i<n;j++)
//multiply the point with acceleration
p[i].acc[j]=0;
}
}
Want to see the full answer?
Check out a sample textbook solutionChapter 6 Solutions
Computer Systems: Program... -Access
- I want the solution for problem 1, 2 and 3arrow_forwardProblem 4 Discrete Mathematics.Combinations and Permutations. (5,10,10): Soccer A local high school soccer team has 20 players. However, only 11 players play at any given time during a game. In how many ways can the coach choose 11 players To be more realistic, the 11 players playing a game normally consist of 4 midfielders, 3 defend ers, 3 attackers and 1 goalkeeper. Assume that there are 7 midfielders, 6 defenders, 5 attackers and 2 goalkeepers on the team 2. In how many ways can the coach choose a group of 4 midfielders, 3 defenders, 3 attackers and 1 goalkeeper? 3. Assume that one of the defenders can also play attacker. Now in how many ways can the coach choose a group of 4 midfielders, 3 defenders, 3 attackers and 1 goalkeeper?arrow_forward4.1.1 Complete solution and answer only no need explanation Given three data points (1,6), (3,28), and (10, 231), What is the value of y at x = 2 if the function y = 2x2 + 3x + 1 passes through the three data points.arrow_forward
- Problem 3 (#2.1.32).Explain why (A×B)×(C×D)and A×(B×C)×D are not the samearrow_forwardPROBLEM 13. [TIME ALLOWED = 5 MINUTES] Give the contrapositive, converse, and inverse of the following proposition: “If the number is positive, then its square is positive.”arrow_forward(b) A 10 pole, 125 HP, 575 V, 60 Hz, 3-ph induction motor operating at rated conditions draws a line current of 125 A and has an overall efficiency of 93%. The core loss, stator conductor loss and rotor conductor loss are 1053 W, 2527 W, and 1755 W respectively. Sketch the power flow diagram, substitute values and determine: (i) shaft speed; (ii) developed torque; (iii) shaft torque; (iv) power factor; (v) combined windage, friction, and stray power loss.arrow_forward
- Show complete solution please. I am at a loss of how to even begin this problem and would like to learn how to work through each step.arrow_forward1. Develop a system of linear equations for the network by writing an equation for each router (A, B, C, D, and E). Make sure to write your final answer as Ax=b where A is the 5x5 coefficient matrix, x is the 5x1 vector of unknowns, and b is a 5x1 vector of constants. 2. construct the augmented matrix [A b] and then perform row reduction using the rref() function. Write out your reduced matrix and identify the free and basic variables of the system. 3. Use MATLAB to compute the LU decomposition of A, i.e., find A = LU. For this decomposition, find the transformed set of equations Ly = b, where y = Ux. Solve the system of equations Ly = b for the unknown vector y. 4. Compute the inverse of U using the inv() function. 5. Compute the solution to the original system of equations by transforming y into x, i.e., compute x = inv(U)y 6. Check your answer for x1 using Cramer’s Rule. Use MATLAB to compute the required determinants using the det() function.arrow_forward4. Describe the requirements that need to be satisfied to solve the critical section problem. Give a solution to the critical section problem where there are 2 processes.arrow_forward
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks Cole