Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Financial Accounting

Authors: Thomas Beechy, Umashanker Trivedi, Kenneth MacAulay

6th edition

013703038X, 978-0137030385

More Books

Students also viewed these Programming questions

Question

1 1 - s i n 2 ( y ) + 1 t a n 2 ( y )

Answered: 1 week ago