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...
int main(){
  ...
» int ivar=1; » float fvar=2.2; » double dvar=3.3; » printf("%d %g %g\n", ivar, fvar, dvar); » printf("Please enter an integer and two floating-point numbers\n"); » scanf("%d %g %lg", &ivar, &fvar, &dvar); » printf("%d %g %g\n", ivar, fvar, dvar); » return 0;
}

Data

ivar (int)   fvar (float)
128   132
1
  
2.20000005
dvar (double)
136
3.3

Memory

main()

128
129
130
131
132
133
134
135
ivar = 1
fvar = 2.20000005
136
137
138
139
140
141
142
143
dvar = 3.3

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

Show Advanced options

.

Input was:

3 4.4 -1.234e12

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

Output

1 2.2 3.3
Please enter an integer and two floating-point numbers
3 4.4 -1.234e+12
                                                                                                                                                                                                                                                                       

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