Question: The following C program has three (3) syntax errors/warnings in it when compiled. Identify and correct the errors by stating the line number where
The following C program has three (3) syntax errors/warnings in it when compiled. Identify and correct the errors by stating the line number where they occur [2 marks each, 6 marks in total]. 10 #include #include 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 #define PI 3.14159 #define g 9.807 int main() { FILE *fp; float length, period; float length_start, length_end; fp-fopen("pendulum.dat", "w"); printf("Enter the starting length "); scanf("%f", &length_start); length_end = length_start + 20; for (length=length_start; length
Step by Step Solution
There are 3 Steps involved in it
Based on the provided image of the C program here are the syntax errorswarnings identified 1 Line 220 The formula for calculating the period of a pend... View full answer
Get step-by-step solutions from verified subject matter experts
