Checking for parentheses balance in C
Bugs


The loop header is wrong:


for(i=0;line[i]!=NULL;i++){



Here, you want to scan until you find a byte with ASCII value 0 (also called an ASCII NUL, and written in C as '\0').  However, you wrote NULL, which is supposed to represent a null pointer (a pointer to memory address 0).

In practice, you might get away with confounding the two, since they are both zero-like in nature, but it is not semantically correct.
The result of this comparison is thrown away:


pile[pilepointer]==NULL;



Did you intend to write pile[pilepointer] = NULL?  That wouldn't be quite right either, since you've confused NULL and '\0' again, as above.  In any case, that statement was unnecessary.
Stack underflow is possible.  If the input is simply ")", for example, you will immediately try to peek at the top of an empty stack (pile[-1]), resulting in out-of-bounds memory access.


Style


Flag variables suck; flag variables named flag are even worse.  At the least, rename it to something meaningful, such as mismatch_found.
When you do


flag = 1;
break;



You are breaking out of the case.  However, you need not bother analyzing the rest of the line.
Pushing and popping are clumsily expressed.  I would write:

char pile[10001];
int pile_size = 0;


To push:

pile[pile_size++] = '(';


To pop:

if (!pile_size || pile[--pile_size] != '(') {
    // Mismatch detected
}

You can coalesce all of the popping cases, if you push the expected matching closing delimiter when you encounter each opening delimiter.

for (char *c = line; *c &amp;&amp; !mismatch_found; c++) {
    switch(*c) {
    case '(':
        pile[pile_size++] = ')';
        break;
    case '[':
        pile[pile_size++] = ']';
        break;
    case '{':
        pile[pile_size++] = '}';
        break;
    case ')':
    case ']':
    case '}':
        if (!pile_size || pile[--pile_size] != *c) {
            mismatch_found = 1;
        }
        break;
    }
}
printf((pile_size == 0 &amp;&amp; !mismatch_found) ? "Yes\n" : "No\n");