Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
B_141128_MatrizUnSoloIndice
Access the structure variable
B_141121_factorial01
Project 3 Part 1 v1.6
my first matrix addition
Programação em C, testes
pattern 17
pointer1
linear_search.c
150116_OrdenMatriz
Please log in to post a comment.