Skip to content
EMPS intranet

Back to top
Hi!   Hi!           Start main()

Try stepping through the code


  Value and type of last evaluated expression: Address of array element: Address of array elementx:  (none)

Your browser does not support the canvas element which will make some the features unavailable.

If you are using Internet Explorer within the University of Exeter try going to the Settings menu (probably the gear shape at the top right of this page), selecting "Compatibility View settings", unchecking "Display intranet sites in Compatibility View" and reloading this page.

Code

 Header...
void myfun(int n){
  ...
» int x[n]; » for ( int i=0;i<n; ++i) scanf("%d", &xi); //...
} int main(){
  ...
» myfun(2); » myfun(6); //... » return 0;
}
Memory

myfun()

128
129
130
131
132
133
134
135
x[0] = 1
x[1] = -7792208
136
137
138
139
140
141
142
143
x[2] = 134535684
x[3] = 0
144
145
146
147
148
149
150
151
x[4] = 134535684
x[5] = 134535684
208
209
210
211
n = 6

myfun()

144
145
146
147
148
149
150
151
x[0] = 134535684
x[1] = 134535684
208
209
210
211
n = 2

myfun(): for()

176
177
178
179
i = 0

myfun(): for()

176
177
178
179
i = 0

NB: the actual memory address of each variable is the
address shown plus 4287174880 (0xFF8918E0).

.

Input was:

31 41 59 26 53 58 97 9

                                                                                                                                                                                                                                                                       

Validate   Link-check © Copyright & disclaimer Share
Back to top