Question: Program: Lowermost Leftmost Please help complete the program below in C language. At the top of a file is a single positive integer, say n.
Program: Lowermost Leftmost
Please help complete the program below in C language.
At the top of a file is a single positive integer, say n. This number is followed by n pairs of numbers that represent (x,y) points in the Cartesian plane. All the pairs will be unique. That is, there are no duplicate points. For example,
5
1 1
-4 -6
22 -6
10 10
0 0
You are to write a C program which identifies and outputs the lowermost point. If there are multiple lowermost points, then you need to select and output the leftmost point of these lowermost points. The point (-4, -6 ) is the lowermost, leftmost point of the points given above. The lowermost point is the one with smallest y value.
The name of the file will come into your program via argv[1].
As in a previous programming problem, you need to create an array of structs. The space for this array should be located in the HEAP, not the run-time stack. This means you need to make a single and appropriate call to malloc.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
