โ Back to Structs
Question 126
Sum of Two Struct Fields
Sum of Two Struct Fields
A Pair struct with int fields a and b is defined. In main, create a Pair with a = 10 and b = 20, then print the sum of its two fields in this exact format: Sum: 30
Expected Output:
Sum: 30
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.