Question: Write the value that the variables a, b, c and d will have at the end of execution of each piece of code below. Show
Write the value that the variables a, b, c and d will have at the end of execution of each piece of code below. Show the intermediate values after each execution step of the program (for each line of code show the contents of all variables) Where necessary eg (c / = a, a ++), show the intermediate results by quoting an equivalent code to explain the results you receive. Answers that simply list the final values without showing and explaining with equivalent code (where needed) the intermediate will have to be reset. You will need to provide answers for both code pieces separately.(C Programming Language)
section code A
int am=The last 3 digits of your registry number;
float a=am+5,b=am+10,c=am+10;
b=b*10;
a=a*b;
c/=a;
int d=a>c?1:0;
section code B
int am=The last 3 digits of your registry number;
int a=am+5,b=am+2;
float c=am+1;
c=a/b;
b=a++;
int d=am%10;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
