CJCoding With Joseph
15free / daySign inCreate account

Book Struct: Title and Page Count

Define a struct type named Book with a text field title (a char array) and an integer field pages. Create a Book with the title "C Basics" and 120 pages, then print it exactly as: C Basics has 120 pages followed by a newline. Set the string field when you declare the variable.

Expected Output:

C Basics has 120 pages

= newline. The output ends with a newline — print one after the last line.

Hints2 available
Topics:
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.