All pastes #274142 Raw Edit

Someone

public text v1 · immutable
·published 2006-12-10 13:34 UTC
rendered paste body
#include <stdio.h>

int array[] = {1, 3 ,4, 7, 2, 0, 8, 1, 6};

int main()
{
  int *arrayptr;
  arrayptr = array;

  while (*(++arrayptr) != 0);

  printf("Number of elements before zero %d\n",
         arrayptr - array);   // <-- whats happening here...

  return 0;
}