Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Goodone for understanding array passing
#include <stdio.h> // arr is a pointer even if we have // use square brackets. void printArray(int arr[]) { int i; /* sizeof should not be used here to get number of elements in array*/ int arr_size = sizeof(arr); // / sizeof(arr[0]); printf("%d\n",arr_size); // for (i = 0; i < arr_size; i++) { // printf(" %d", arr[i]); // } } int main() { int arr[4] = { 1, 2, 3, 4 }; printArray(arr); return 0; }
run
|
edit
|
history
|
help
0
Project 4 v1.1
dcl
main.c
18BCE2182 ASSESS_1 Q1-5
FunPointUnion
1.3 Max threads
C_141106_Divisores
Padding Err
NETFLIX TERMINADO
ponyerb orange panther