โ Back to Structs
Question 125
Set a Struct Field
Set a Struct Field
A Counter struct with an int field value is defined. In main, create a Counter, set its value to 42 using the dot operator, then print the value. Expected output: 42
Expected Output:
42
Topics:
Structs
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท 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.