← Back to Structs
Question 132
Compare Two Struct Fields
Compare Two Struct Fields
A Pair struct with int fields a and b is defined and initialized in main. Print 'Equal' if the two fields are equal, otherwise 'Not equal'.
For the given data {7, 7} this prints: EqualExpected Output:
Equal= newline. No newline after the last line.
Hints3 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.