Question: I m trying to do # 3 printstats. I ve edited the Makefile and wrote the c code but I have errors in my c

Im trying to do #3 printstats. Ive edited the Makefile and wrote the c code but I have errors in my c code and therefore the make qemu isnt running as required. Can you solve this pls?
#include "types.h"
#include "stat.h"
#include "user.h"
#include "printf.h"
#define MAX_SIZE 200
void sort(int *arr, int num_elements)
{
for (int i=0; i arr[j+1])
{
int temp = arr[j];
arr[j]= arr[j+1];
arr[j+1]= temp;
}
}
}
}
double sqrt(int x)
{
if (x 0)
{
return 0.0/0.0;
}
double guess =1.0;
double epsilon =1e-15;
while (1)
{ double new_guess =0.5*(guess + x / guess);
if (guess - new_guess epsilon && new_guess - guess epsilon)
{
return new_guess;
}
guess = new_guess;
}
}
int main (int argc, char*argv[])
{
char* arr[MAX_SIZE];
int num_arr[MAX_SIZE];
int num_elements= argc-1;
for(int i=0;i
I m trying to do # 3 printstats. I ve edited the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!