Pass by Value (this term to be explained later - not necessary to understand for this assignment) Assignment 1: 1. declare 4 - int variables - a,b,c,d - with values 10,20,30,40. Can discuss what are choices on where to declare these variables in the program. 2. write float Average(int p1, int p2, int p3, int p4) function that returns average of these numbers. 3. in main call average function passing the arguments and receiving the average value and print the answer. 4. Draw the memory layout diagram, showing where each variable is allocated..
Pass by Value (this term to be explained later - not necessary to understand for this assignment) Assignment 1: 1. declare 4 - int variables - a,b,c,d - with values 10,20,30,40. Can discuss what are choices on where to declare these variables in the program. 2. write float Average(int p1, int p2, int p3, int p4) function that returns average of these numbers. 3. in main call average function passing the arguments and receiving the average value and print the answer. 4. Draw the memory layout diagram, showing where each variable is allocated..