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.
Enter
-> item ID: 101024
-> full item price: 199.95
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment