HackerTrans
TopNewTrendsCommentsPastAskShowJobs

mnaydin

no profile record

comments

mnaydin
·há 3 anos·discuss
I 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
·há 3 anos·discuss
This is equivalent to

  while (1) {
    calc(x++);
  }
which is an infinite loop, since the expression x <= max is always true