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...
#define MAXLEN 8 #define MAXNUCLIDES 2 typedef struct nuclide { double halflife; char name[MAXLEN]; }Nuclide;
int main(){ » Nuclide nucs[MAXNUCLIDES]; » for ( int n=0;n<MAXNUCLIDES; ++n) scanf("%s %lg", nucs[n].name, &nucs[n].halflife); //... » return 0; }
...
Memory

main(): for()

132
133
134
135
n = 0

main()

136
137
138
139
140
141
142
143
nucs[0].halflife = -2.0814446e+199
144
145
146
147
148
149
150
151
nucs[0].name = 'T' ' ' ' ' '3' ' ' 'p' ' ' ' '
152
153
154
155
156
157
158
159
nucs[1].halflife = 2.78888424e-157
160
161
162
163
164
165
166
167
nucs[1].name = ' ' ' ' 'z' '-' ' ' ' ' ' ' 'g'

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

Show Advanced options

.

Input was:

U235 7.038e8 Cs134 2.0652

                                                                                                                                                                                                                                                                       

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