Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C propramming assicrment (Honsework should be tamed in on Cagvas only. NOT via email unless you cannot axtess Canvas) 1) Write a function float computeAroa

image text in transcribed
C propramming assicrment (Honsework should be tamed in on Cagvas only. NOT via email unless you cannot axtess Canvas) 1) Write a function float computeAroa (int "v1. int "v2, int thape) that computes the area of four busic geometric entities. The geometric entity wall be identified by the argument shape which is 1 for triaggle. 2 for squareirectangle and 3 for circle. The arguments v1 and 22 are pointers to the two arguments defining the shape. For circle vi is a pointer to the diamseter of the drde, ve is nal. for fnctaneinheuare, v1 and 2 are pointers to the height and width for triangle v1 is a pointer to the the base and ve peints to the height of the triangle. 2) Write a function that accepts a string and a character as input and returns the namber of times the character given as the second argument appears in the string int num TimesAppears/char "mystrine char ch) If mystring 6 "Protessar Ken' and ch 'o' are passed as arguments the function should return 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

More Books

Students also viewed these Databases questions