My programs gives an error : syntax error before ']' for line 11? I also wanted to know how to call a function in c program?
Code:# include <stdio.h> # include <stdlib.h> int (sum_table int array [], int height); int main (int ar, char * agv []) ( int array [5] = (1, 2, 3, 4, 5); printf ( "Here is the sum of the table:% d", sum_table (array [], 5)); return 0; ) sum_table int (int array [], int size) ( int i, sum; for (i = 0; i <size; i + +) ( sum = sum + array [i]; ) return sum; )
Bookmarks