Question: Q1. create three functions square, rectangle, and circle only for calculating and returning the area. Therefore, Write a C program that displays the following menu:

Q1. create three functions square, rectangle, and circle only for calculating and returning the area. Therefore, Write a C program that displays the following menu:

1. Find area and perimeter of a square

2. Find area and perimeter of a rectangle

3. Find area and perimeter of a circle

The program then reads the menu choice and behaves as in the following table:

Q1. create three functions square, rectangle, and circle only for calculating and

Note: Assume that the values read by the program for options 1, 2, and 3 are in centimeters. For these options, your program must display appropriate units in the output.

Q2. Consider an equation of the form, ax2+bx+c = 0, where a, b, and c are the coefficients of x. The roots of this equation can be calculated by the below formula

returning the area. Therefore, Write a C program that displays the following

If the expression, b2 4ac, which is also called the discriminant, is positive then the equation has real roots. If the discriminant is negative, the equation has imaginary (or complex) roots. Write a function name CheckRoots that accepts the references of the coefficients of an equation as parameters, checks if the roots are real, and calculates the roots of the equation

Q3. Create a four-question multiple choice question on C programming language, each question having three possible answers (numbered 13). Write an application/code that administers the quiz, calculates the number of correct answers (zero through four) and returns a message to the user. If the user correctly answers four questions, print Excellent; if three, print Very good; if two or fewer, print Time to brush up on your knowledge of C programming,.

You need to show the below questions one by one on the screen and ask the user to answer (1-3). The possible question pattern might be, [you can use any MCQ questions as your choice]

1. Who is the father of C language?

1) Steve Jobs

2) James Gosling

3) None 2.

2. Which of the following is not a valid C variable name?

1) int number;

2) float rate;

3) None

3. All keywords in C are in ____________

1) LowerCase letters

2) UpperCase letters

3) None

4. Which keyword is used to prevent any changes in the variable within a C program?

1) immutable

2) mutable

3) None

x=2abb24ac

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!