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.


#define OPTION1 0x01 // 1 binary 00000001 #define OPTION2 0x02 // 2 binary 00000010 #define OPTION3 0x04 // 4 binary 00000100 #define OPTION4 0x08 // 8 binary 00001000 #define OPTION5 0x10 // 16 binary 00010000 #define OPTION6 0x20 // 32 binary 00100000
int main(void){
» unsigned int flags=0; » flags|=OPTION3;// Set OPTION3 » flags|=OPTION4;// Set OPTION3 » flags&=~OPTION4;// Unset OPTION4 » if ((flags&OPTION3)) printf("Option 3 is set\n"); » return 0;


flags = 0

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

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.)


Option 3 is set

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