Question: C programming QUESTION 2 [20 MARKS The two statements below explain two input functions defined in the stdio.h header file as written in the GNU


QUESTION 2 [20 MARKS The two statements below explain two input functions defined in the stdio.h header file as written in the GNU C Library reference manual. Based on that, explain the advantage of using scanf() function over getchar() function in reading character input(s). int scanf (const char *template, ...) int getchar (void) [4 Marks) (b) The program in Figure 1 is written to calculate and display equivalent resistance value based on connection type. Compiling the program however, results in at least five errors and warnings that causes the program to NOT work properly. Study and correct the code by highlighting the line numbers, explaining the error/warning and suggest correction, for EACH error/warning [16 Marks] 2. BE 1. #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
