Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please find out the errors(around 10) in this program in C language, and please

ID: 3903289 • Letter: P

Question

Please find out the errors(around 10) in this program in C language, and please explain the reason

1-  */ This program has many errors */

2-  #include <stdio.h>

3-  #define CO 50;

4-  const int n=2;

5-  char str[4] = "BYE ";

6-  void main()

7-  {

8-  n = strlen( str );  

9-            int number;

10-                    while( n == 0 )

11-                    {

12-                       printf("Enter a number between 1-50 -->");

13-                              scanf("%d", number);

14-                              valid = 1;

15-                              if( number =< 0 )

16-                              {

17-                                 printf("number is ");

18-                                 valid = 0;

19-                              }

20-                              if( number > CO )

21-                              {

22-                                 printf("number is > 10 ");

23-                                 valid = 0;

24-                                }

25-                              printf("The number is %d ", number );

26-                              printf(" %f %d ", number, log(n));

27-                    }

28-                    return 0;

29- }

Explanation / Answer

#include #include //No semicolumn at the end #define CO 50 const int n=2; char str[4] = "BYE "; void main() { //You have to declare a variable valid before using it int valid; //n is a const, So, we shouldn't change it //n = strlen( str ); int number; while( n == 0 ) { printf("Enter a number between 1-50 -->"); scanf("%d", number); valid = 1; //Lessthan or equals is