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...
typedef struct ellipse { float centre[2]; float axes[2]; float orientation; float area; }Ellipse; #define PI 3.14159265358979
int main(){
  ...
» Ellipse ellie, *ep;// ellie is a structure, ep just a pointer » ep=&ellie; » ep->orientation=PI/4; » printf("Orientation: %g\n", ellie.orientation); » return 0;
}
Memory

main()

128
129
130
131
132
133
134
135
ep = -143988345
ellie.centre[0] = -5.0668e+33
136
137
138
139
140
141
142
143
ellie.centre[1] = 1.4013e-45
ellie.axes[0] = -4.63612e+33
144
145
146
147
148
149
150
151
ellie.axes[1] = 3.99868e-34
ellie.orientation = 3.99858913e-34
152
153
154
155
ellie.area = 1.40129846e-45

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

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

Orientation: 0.785398
                                                                                                                                                                                                                                                                       

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