sizeof of argument array might be suprising...
Just something I wasn't aware of...
Code:
#include <stdio.h> sizeof(test_array1): 24 sizeof(test_array2): 24 sizeof(test_array3): 4 sizeof(test_array4): 24 sizeof(test_array5): 24 |
Re: sizeof of argument array might be suprising...
the arrays in parameters are the same as pointers, so that's why you got result like that. :)
i.e., int func_test_array3(int test_array3[6]) is 100% the same as: int func_test_array3(int *test_array3) |
Re: sizeof of argument array might be suprising...
yep. ... I should reload before posting
|
All times are GMT +2. The time now is 18:04. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.