Answer to Question #182087 in C for sadiq bandukda

Question #182087

 challenge.h 

#include <stdio.h>

float foo(float F); 

float bar(float F);



main.c 

#include "challenge.h"

float a = 8.5;

int main() {

 float fa = foo(a);

 float ba = bar(a);

 printf(“%.1f\n”, fa + ba);

 return 0;

}


challenge.c

#include "challenge.h"

extern float a;

float foo(float F) {

 a = 7.3;

 return F * a

}


challenge2.c

#include "challenge.h"

extern float a;

float bar(float F) {

 a = 7.5;

 float ff = foo(F);

 return ff * a;

}


Given the source code above and we use "gcc main.c challenge.c challenge2.c -o challenge" to compile it. What's the output when we type ./challenge


1
Expert's answer
2021-04-16T02:52:34-0400

output will be 451.1


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS