Question: Using Geany, write the following C program as is: #include inx main (void) { int a = 3; b = 4, e; Double f =
- Using Geany, write the following C program as is:
#include
inx main (void) { int a = 3; b = 4, e; Double f = 4, c, d; d = a + b; c = a / (f - b); printf (The value of d is %d" , d) return (0); } - Compile the program.
- This program contains syntax errors. On a piece of paper, indicate each one of them and make the appropriate corrections.
- Write your answers in a text file.
- Try to correct the errors. Compile and build the program with all the corrections made.
- Once the syntax errors have been corrected, there are two errors that remains when you try to run it (one is called a runtime error because you are trying to do something illegal, the other is a logic error because you made a small mistake in the program). What are they? Tell your TA or ask for hints!
- Correct the errors and compile and run the program again. What value of d is displayed?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
