Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <emscripten.h>
- #include <stdio.h>
- // Method being called by JS
- EMSCRIPTEN_KEEPALIVE
- int sum_arr(int* arr, int length)
- {
- int sum = 0;
- for(int i = 0; i < length; i++)
- {
- printf("%d\n", arr[i]);
- sum += arr[i];
- }
- return sum;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement