Question: Hello, please see the below code in C. I am trying to compile it and it won't compile correctly due to the return statement in

Hello, please see the below code in C. I am trying to compile it and it won't compile correctly due to the return statement in file 1. Without using the pow() function, can you please help me?

Thank you!!

File #1

#include

int pow_xy(int *xptr, int y) {

int result;

while (y != 0) {

result *= *xptr;

y--;

}

return result;

}

File #2

#include #include "file1.c"

void test_p4() { printf(" p4 "); int numbers[5]; init_array(numbers, 5, 2); int i; for (i=0; i<5; i++) printf("%d ", numbers[i]); printf(" "); }

int main() {

test_p4();

}

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 Databases Questions!