Toggle a Flag Field
easyQuestion 402A struct Switch has an int field on that is currently 1. Toggle it so that 1 becomes 0 (and 0 would become 1), then print the result (see Expected Output).
Use the logical NOT operator !. There is no trailing newline.
Expected output
0= newline. No newline after the last line.
Hints2 available
Sign in to use hintsTopics
Structs
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (p, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.