Skip to content
EMPS intranet

Back to top
Hi!   Hi!           Start program

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...
int main(){ » int numbers[10], k; » for ( int i=0;i<10; ++i) { » printf("Please enter value %d\n", i); » scanf("%d", &numbersi); } » for ( int i=0;i<10; ++i) printf("Value %d: %d\n", i, numbersi); » return 0; }
...
Memory

main()

132
133
134
135
k = 2000958970
136
137
138
139
140
141
142
143
?
?
?
?
numbers[0] = 590454716
144
145
146
147
148
149
150
151
numbers[1] = 1855603727
numbers[2] = -380541132
152
153
154
155
156
157
158
159
numbers[3] = 865478484
numbers[4] = -600299406
160
161
162
163
164
165
166
167
numbers[5] = -144858627
numbers[6] = 527344087
168
169
170
171
172
173
174
175
numbers[7] = 759822837
numbers[8] = 1742409361
176
177
178
179
numbers[9] = -1768238290

main(): for()

136
137
138
139
i = 0

main(): for()

136
137
138
139
i = 0

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

Show Advanced options

.

Input was:

3 1 4 1 5 9 2 6 5 3 7
3 1 4 1 5 9 2 6 5 3 7

Show output (Before looking at the output, work out what you think it put should be and see if you are right.)

Output

Please enter value 0
Please enter value 1
Please enter value 2
Please enter value 3
Please enter value 4
Please enter value 5
Please enter value 6
Please enter value 7
Please enter value 8
Please enter value 9
Value 0: 3
Value 1: 1
Value 2: 4
Value 3: 1
Value 4: 5
Value 5: 9
Value 6: 2
Value 7: 6
Value 8: 5
Value 9: 3
                                                                                                                                                                                                                                                                       

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