Question: Please provide explanation Prove explanation add.c: #include helper.h int count; int res; int main () {add (4, 6); count++; printf (%d and %d , count,

 Please provide explanation Prove explanation add.c: #include "helper.h" int count; int

Please provide explanation

Prove explanation add.c: #include "helper.h" int count; int res; int main () {add (4, 6); count++; printf ("%d and %d ", count, res); return 0;} helper.h: #ifndef __helper_h__ #define __helper_h__ #include extern int count; extern int res; void add (int a, int b) {count++; res = a + b;} #endif The code above is compiled using "gcc add.c". Output of the above program would be: 0 and 0 Undefined behaviour 1 and 10 2 and 10 1 and 0

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!