[Practice][Functions] Book Information - Structs and Enum


Submit solution

Points: 10
Time limit: 0.5s
Memory limit: 2M

Author:
Problem type
Allowed languages
C

Problem Definition

Define a structure called Book. The structure has a title, author, publicationYear, and Genre elements.

Define an enum called Genre. Enum has the following elements FICTION, NON_FICTION, SCIENCE_FICTION, MYSTERY, THRILLER.

Function displayBookInfo should get the Book structure variable as a parameter and print the details.

Test Data

Sample Input 1
Bharathiyar Kavithaigal
Bharathiyar
2013
NON_FICTION
Sample Output 1
Title: Bharathiyar Kavithaigal
Author: Bharathiyar
Publication Year: 2013
Genre: Non-Fiction

Comments

There are no comments at the moment.