1. Engineering
  2. Computer Science
  3. computer systems ...

Question: computer systems ...

Question details
Computer systems .
Test the following pairs of source files and answer the following for each case:i a. What is the binding and kind of the linker symbol x (global/ local, strong/weak.) in each pair? b. Which rule was applied to resolve the symbol x in each pair? c. What is the expected output values in each case? d. What is the run output values in each case, if any? e. Explain what went wrong in detail, if any. Write your answers in a well designed table. finclude <stdio.h> #include <stdio.h> int a 2; void test() int main () t int a-l; void test ()f printf(1 a-%d ,a); test) printf(2 a id , a)i return 0; , #include <stdio.h> short int a; void test ()( include <stdio.h> int a-1 void test) int main()I a-1; printf(1 a-8dIn, a) 2 test ); print f ( 2 return 0 a-%d , a ) ;
#include <stdio.h> int x=-1; void test) include <stdio.h> int xi void test int main ) 3 | , printf(1 x-%d\n,x); test)i printf(2 x-8din, x) return 0 #include int x=1; #include <stdio.h> <stdio.h> static int xi void test ) void test; int main )f x=-1 ; printf(1 x-din, x) test ) printf(2 x-%d\n,x); return 0 <stdio.h> #include <stdio.h> static int x; void test ) #include extern int xi x=-1; printf(1 void test) int main) f test )i 5 x 8dn,x) x=%d\n,x); printf(2 return 0; #include <stdio.h> int x; void test) #include <stdio.h> extern int x void test) int main) test) printf ( 1 x=%d\n, x); printf(2 x=%d\n,x); return 0
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution