/* Collection of code snippets by Arne Vajhøj */
/* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) */
#include <stdio.h>

int main(int argc, char *argv[])
{
  FILE *fp;
  int n = 0;
  char line[100];
  fp = fopen(argv[1], "r");
  while(fgets(line,sizeof(line),fp))
  {
    n++;
  }
  printf("%d\n", n);
  return 0;
}
