mnaydin·3 năm trước·discussI am not able to understand how int (*ap3)[900000] = malloc(sizeof *ap3); is nicer than int *a = malloc(900000 * sizeof *a); Notice that, in the former case, the array elements must be accessed as (*ap3)[i] whereas in the latter case the usual method a[i] is fine.
mnaydin·3 năm trước·discussThis is equivalent to while (1) { calc(x++); } which is an infinite loop, since the expression x <= max is always true
is nicer than
Notice that, in the former case, the array elements must be accessed as (*ap3)[i] whereas in the latter case the usual method a[i] is fine.