Are pointers and arrays any different in C? -


I'm writing a small program to crunching a few numbers, and passing arrays around the middle of the functions

L, int lane) {int * reversed = malloc (sizeof (* reverse) * len); Int i, j; For (i = 0, j = len-1; i & lt; len; i ++, j--) {reverse [j] = l [i]; } Return reversed; }

Am I using the correct indicator?

Your code snippet is correct. However, signs and arrays in C are actually different. Just "indicator to type indicator" is not equal to "T type array".

Please Pointer & amp;

Arrays to get a better understanding of this

Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -