Question
int sum(int n){ int i=0; int s=0; for(int i=0; i
int sum(int n){
int i=0; int s=0; for(int i=0; i<= n; i++){ s=s+i; }
printf("The sum of first %d numbers is %d. ", n,s); }
Disassembly of section .text:
0000000000000000
Study the generated assembly and find out what registers are used to store variables i and s of the code in sum.c. Explain your reasoning.
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