Page 1 of 1

Consider the following functions: void Qi (int *sale, int *price, int quantity) { *sale= (*price) * quantity; }; void Q2

Posted: Sat Feb 19, 2022 3:21 pm
by answerhappygod
Consider The Following Functions Void Qi Int Sale Int Price Int Quantity Sale Price Quantity Void Q2 1
Consider The Following Functions Void Qi Int Sale Int Price Int Quantity Sale Price Quantity Void Q2 1 (41.68 KiB) Viewed 34 times
Consider the following functions: void Qi (int *sale, int *price, int quantity) { *sale= (*price) * quantity; }; void Q2 (int profit, int *price, int cost) { profit = (*price) - cost; }; { int Q3 (int revenue, int *price) revenue = 10; revenue += (*price); return revenue ; }; What are the final values of 'data' when the following C statements are executed in the main function? int data [3] = {1,2,3); Q1 (&data[0], &data[2], 100); Q2 (data[1], &data[2], 50); data [2] = 03 (0, &data[2]); a) data[0] b) data[1] c) data[2]