Question: Part 1 Topic: Static Variables Write, compile and test the following program. #include void test() { int x=3; x++; printf(x = %i , x); }

Part 1 Topic: Static Variables Write, compile and test the following program.#include void test() { int x=3; x++; printf("x = %i ", x);} int main() { int i; for(i=0; i Part 2 Part 1Part 1 Topic: Static Variables Write, compile and test the following program. #include void test() { int x=3; x++; printf("x = %i ", x); } int main() { int i; for(i=0; i Part 2 Part 1 Topic: Static Variables Write, compile and test the following progran. #include yoid test) Topic: Optimization and test the following program. Compile from the command line using the command: gcc mymaim.-o mymain.exe #include int x-3 printf("K-%i ", x); int main0 int i; int main int i, sum toni-0;?2000000000; i++) sum-5 print'sum-n, sum); return 0; testo: retum 0; program using level 2 optimization with the Now, make the variable x in test0 a static variable (i.e. static int x-3;). Rebuild and run the Kro8tam gaim. Now, re-compile the gcc-02 mymain.c-o mymain exe Run the program agam. Insert: Insert: Observation

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!