Prime factors of a number in C
Can you describe a bit your algorithm ? There is no comments in your code and it is not straightforward (because no comments is acceptable when the code is easy to read, but not in this case). 
A few things that you should consider :


the use of global variables is here totally inapropriate, n should not be global and your function pf should take an argument (and should also return an array of the prime factors found, if you need them)
the while(1) is useless the two times you used it. It is commonly bad practise to use this, and especially when there is only one condition in the loop and when you exit the loop when the condition is not true. You should use while(condition) instead
Name correctly your variables ! What are i, x, n ? It improvs readability by a lot with absolutely no cost, so you should do it
I also don't see why you need the goto. Again it makes your code hard to read for no obvious good reason.
If n is a positive number, you should use an unsigned type. Since you want to be able to process 10 digits numbers, I would recommend using unsigned long long


Aside from that, I think it's mostly the algorithm that you use that is ineffective, which is why you should explain what you tried to do.