CJCoding With Joseph
15free / daySign inCreate account

Student Struct: Name and Grade

Define a struct type named Student with a text field name (a char array) and an integer field grade. Create a Student for "Alice" with a grade of 90, and print it exactly as: Alice: 90 followed by a newline. The easiest way to set a string field is to give the values when you declare the variable.

Expected Output:

Alice: 90

= 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.