Answered step by step
Verified Expert Solution
Question
1 Approved Answer
// Part 2: // we want to pass incremented value of x and the decremented value of y // to the macro and function to
// Part 2: // we want to pass incremented value of x and the decremented value of y // to the macro and function to compare their outputs in VS and GCC. // Run this program in Visual Studio(VS) and then again in GCC. // Fill the blanks below with the output values for expFunc and expMacro. // Then correct/edit the function so that expFunc and expMacro produce // same correct output of 587 . // (10 points) // void part2(int x, int y){ int xcopy =x1,ycopy =y; printf ( expFunc (x,y)=%d\ expMacro (x,y)=%d ", expFunc (++x,y), // Replace the 4 blank spaces below with the actual output // observed when running the code in VS and GCC. // The blanks should have the answers of unedited program. // Keep the answers in blanks as they were, after editing the program, // (10 points each run 20 points) printf("In VS, the result of expFunc = _ and expMacro =1n ); printf("In GCC: the result of expFunc = and expMacro =ln ); // Explain in a short sentence why VS and GCC could possibly produce // a different value for the same program and for the same input
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started