1 of 8

C: 146

n,i,o,c,l;main(int g,char**v){for(n=atoi(v[1]),i=3,l=2,o=0;o<n;i++){for(c=2;c<=i-1&&i%c;c++);l=c==i?(o+=(i==l+2),i):l;}printf("%d, %d\n",l-2,l);}

Takes N (>=1) from the first command line argument, hope that's okay.

Sample run:

$ for i in $(seq 1 10); do ./twinprimes $i; done
3, 5
5, 7
11, 13
17, 19
29, 31
41, 43
59, 61
71, 73
101, 103
107, 109