Write a function readSaleRecord prototyped by
int readSaleRecord(unsigned & itemId, double & itemPrice,
char & discountType, unsigned & quantity);
so that the execution of this function will retrieve 4 fields, i.e. the item ID itemId, the original item price itemPrice, the discount type discountType and the quantity quantity, from the stdin device. The returned value will be 0 if the reading has been successful, and will be non-zero if otherwise. In fact, when the record is not successfully read, the returned value will be 1 if it's due to receiving 0 for the item ID or hitting the EOF, and will be -1 if otherwise.
Explain (i) what do the ampersands "&" do in the prototyping; (ii) is this function still syntactically correct if some of these 4 ampersands are removed from the function header; and (iii) will your program still work if one of these 4 ampersands is removed and why. Please also use the following interface for the input.
-> item ID: 101024
-> full item price: 199.95
College and University is a time in your life when you find your passions and your interests and you study…
APPROVED BY CLIENTS
Always satisfied assignment results and explanation of them so that I could study with it! However, the one thing I would like to concern is about the price. I would like to know how you guys make the price. For me, I don’t actually think that the price is always reasonable since I don’t know how the price is offered and made. It will be much better if you guys offer like a rubric something about prices to customers so that we could understand. Anyway, I do appreciate the efforts that experts have made for me. Thank you!