This is a simple C program that I created to help me better understand data structures in C (as there is no such thing as objects or classes in C). I created a simple word problem so I would know what I wanted to achieve with this program. See word problem below.
Compiler used: GNU GCC
To compile and run the program,
(1) git clone https://github.com/kennerhartman/data-structures-c.git
In the console,
(2) gcc helloworld.c
(3) ./a.out
or ./a.exe
Peter is looking to keep track of 3 different books within a program. He has given you the responsibility to make a program that will keep track of the following information:
Book one:
-
Title: The C Programming Language 2nd Edition
-
Author: Dennis Ritche
-
Description: A book about the C programming language, developed by Brian Kernighan and Dennis Ritchie
-
Year published: 1978
Book two:
-
Title: Maze Runner: The Maze Runner
-
Author: James Dashner
-
Description: “The story is set in a distant future, where a group of teens are mysteriously teleported into a giant, stone maze. Not only has their memory been cleared, but they also have no indication as to why they have ended up in this position and what means they must take to escape” (PPLD Book Reviews).
-
Year published: 2015
Book three:
-
Title: Percy Jackson: The Lightning Thief
-
Author: Rick Riordan
-
Description: “The Lightning Thief is a light-hearted fantasy about a modern 12-year-old boy who learns that his true father is Poseidon, the Greek god of the sea. Percy sets out to become a hero by undertaking a quest across the United States to find the entrance to the Underworld and stop a war between the gods” (Rick Riordan, The Lightning Thief Rationale).
-
Year published: 2005
No need to write to a text file, just print everything to the console