Quiz: Designing Functions
Practice and reinforce your skills in designing function prototypes through targeted quiz questions. This lesson helps you understand modular coding and prepares you to write and debug efficient functions for complex problem solving.
We'll cover the following...
Let’s solve some quiz questions below to revise writing the function prototypes. In the quiz, we may have multiple correct options. So let’s start!
Function Prototypes
(Select all that apply.) Given three points (where each point has x, y coordinates), the module should tell whether the input points represent an Equilateral, a Right-Angle, an Isosceles Right Angle, an Isosceles, or a Scalene triangle. Which of these function prototypes is correct? Multi-select
int triangleType(int p1x, int p1y, int, int, int, int);
int triangleType(int p1, int p2, int p3);
int triangleType(int p1x, int p1y, int p2x, int p2y, int p3x, int p3y);