subject

You work in a pawn shop that gets in shipments of jewelry. Each shipment is kept in a file (see below for a sample file) and contains the type of jewelry, the stone in the piece of jewelry and whether it is real or fake. Create a function that prints to screen certain information about the shipment and returns the number of a specific number of items (based on the arguments-see sample runs) File: jewelry1.txt ring diamond real necklace diamond real ring sapphire fake bracelet ruby fake bracelet diamond fake Sample runs: printf("%d\n",get_available_items(" jewelry1.txt","stone")); (base) Computers-MacBook Air! computers .la. out I see that -stone- is important in this shipment. Any specific stone to count? diamond OK. I will keep count of the number of the following that I find: diamond --diamond print out all stones --diamond - - Sapphire --ruby --diamond -ruby returns 3 since there are 4 diamonds printf("%d\n",get_available_items(" jewelry1.txt", "type")); (base) Computers-MacBook Air:C computers ./a. out I see that -type- is important in this shipment Any specific type to count? ring Ok. I will keep count of the number of the following that I find: ring ring print out all types --necklace -ring --bracelet --bracelet --ring 3 returns 3 since there are 3 rings printf("%d\n",get_available items("jewelry1.txt", "authentic")); (base) Computers - MacBook Air:C computers .la. out I see that -authentic. is important in this shipment. Any specific authentic to count? fake Ok. I will keep count of the number of the following that I find: fake - real print out all real/fake - real - fake - fake --fake fake returns 4 since there are 4 fakes printf("%d\n",get_available_items(" jewelry1.txt","cookie")); (base) Computers-MacBook Air:C computers ./a. out Unknown parameter to check...-1 you have to pass one of the following: type. Stone, authentic

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:50
Which are steps taken to diagnose a computer problem? a) reproducing the problem and using error codes b) reproducing the problem and troubleshooting c) using error codes and troubleshooting d) using error codes and stepping functions
Answers: 1
question
Computers and Technology, 22.06.2019 22:00
What is a distinguishing feature of today’s graphic application software?) graphic applications are used today on a variety of devices, including touch-screen kiosks and mobile phones.
Answers: 3
question
Computers and Technology, 23.06.2019 13:00
In excel - calculate the actual increase/decrease from first quarter to the second quarter then subtract subtract first quarter value from second quarter total then divide result by first quarter value
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
What is html ? give a small description about html
Answers: 2
You know the right answer?
You work in a pawn shop that gets in shipments of jewelry. Each shipment is kept in a file (see belo...
Questions
question
Health, 13.11.2019 05:31
question
History, 13.11.2019 05:31