scanf("%d", &t);
And
scanf("%d%d", &x[q][0], &x[q][1]);
Notice the ampersand (address-of operator). scanf() requires a pointer to an object, and you were passing some random number which was extremely unlikely to be a valid address in your address space.
deceptikon
Challenge Accepted
3,505 posts since Jan 2012
Reputation Points: 824
Solved Threads: 481
Skill Endorsements: 58