a) Briefly explain the difference between array and struct. (1 mark) b) Define a struct movieType, to store the following data about a movie:
a) Briefly explain the difference between array and struct. (1 mark) b) Define a struct movieType, to store the following data about a movie: movie title, movie director, the year the movie was released, and number of copies in stock. (2 marks) c) Based on the struct definition at (b), declare a variable of type movieType to store the following data: movie title-Hantu Kak Limah Balik Rumah, director-Mamat Khalid, year the movie released-2010, the number of copies in stock-50. (3 marks) d) Display a message "The item needs to be restocked." if the copies of stock are less than 10 units. (2 marks)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started