Example: passing array to a function
{"Image DocumentName": "Example: passing array to a function", "Image ImageDescription": "#include <stdio.h> #define size void get_marks(float [ ]); float calc_average(float [ ]); int main(void) { float marks[size] = {0.0}; / initializing the array get_marks(marks); /  function call  / printf( Average for marks given is %.2f , calc_average(marks)); return(0); } void get_marks(float marks[ ]) /  reading the marks from the users  / int i; for (i = 0; i < size; i++) printf( Marks for student %d: ,i + 1); scanf( %f ,&marks[i]); float calc_average(float marks[ ]) float total = 0.0; total = total + marks[i]; return (total / size); Example: Passing Array to a Function. Example: passing array to a function. Marks for student 1: 56. Marks for student 2: 96. Marks for student 3: 78. Marks for student 4: 35. Marks for student 5: 66. Average for marks given is Press any key to continue.", "Image XResolution": "37", "Image YResolution": "37", "Image ResolutionUnit": "Pixels/Centimeter", "Image Software": "SlidePlayer", "Image YCbCrPositioning": "Centered"}