- Consider The Following Functions Void Qi Int Sale Int Price Int Quantity Sale Price Quantity Void Q2 1 (41.68 KiB) Viewed 32 times
Consider the following functions: void Qi (int *sale, int *price, int quantity) { *sale= (*price) * quantity; }; void Q2
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Consider the following functions: void Qi (int *sale, int *price, int quantity) { *sale= (*price) * quantity; }; void Q2
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]