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...
// Demonstration function: return its argument plus 2;
double xplus2(double x){
  ...
» return x+2.0;
} int main(){
  ...
» double r, r2; » r=1.7; » r2=xplus2(r); » printf("%g plus two is %g\n", r, r2); » return 0;
}

Data

xplus2()

x (double)
128
1.7

main()

r (double)   r2 (double)
192   200
-9.59793624e+266
  
4.93353858e-270

Memory

xplus2()

128
129
130
131
132
133
134
135
x = 1.7

main()

192
193
194
195
196
197
198
199
r = -9.59793624e+266
200
201
202
203
204
205
206
207
r2 = 4.93353858e-270

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

Show Advanced options

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

Output

1.7 plus two is 3.7
                                                                                                                                                                                                                                                                       

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