Select Page

COMPE 271 San Diego State University C Language Problem

Question Description

1- Write a function float computeArea (int *v1, int *v2, int shape ) that computesthe area of four basic geometric entities. The geometric entity will be identified bythe argument shape which is 1 for triangle, 2 for square/rectangle and 3 for circle.The arguments v1 and v2 are pointers to the two arguments defining the shape.

For circle v1 is a pointer to the diameter of the circle, v2 is null, for rectangle/square,v1 and v2 are pointers to the height and width for triangle v1 is a pointer to the thebase and v2 points to the height of the triangle.

2- Write a function that accepts a string and a character as input and returns thenumber of times the character given as the second argument appears in the string.

int numTimesAppears(char *mystring, char ch)

“Yusuf Ozturk” and letter u is passed as arguments the function should return 3.

Content

(* – Mandatory)

1*. Description of the problem/method

2. Pseudocode (if required. Mandatory for the Lab assignments, starting from #5 and Projects)

3*. C-code

4*. Screen capture of the code and the resulting display(s)

5. Conclusion (if applicable)

6*. References

SKIP STEP 5

Add comments and please have a pseudocode document explaining what was done

"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you "A" results."

Order Solution Now