Counting the longest increasing subsequence in an array of integers
Here is one comment about the readability of your code.

/* 1 means not used */
int used_flag[seq_size];


I allowed myself to change the "use" to "used", because it is more grammatically correct.

Now first of all, if "1 means not used", then you should name this array not_used_flag.

Alternatively, you can keep calling it used_flag, but let 0 denote the case of "not used".

If you choose the second option, then you can initialize the entire array upon declaration:

int used_flag[seq_size] = {0};


Please note that it doesn't yield better performance because it's a non-static local array.

Nevertheless, it does clean up your code a bit...



Another point is implied in a comment at the bottom of your code:

/* the initialization value of -1 is just to calibrate the system.
   it takes an extra loop around and gives a wrong result otherwise. */


It sounds like an ugly workaround for "an extra loop" that should not take place.

So I think that you definitely need to solve it properly instead of working around it.



Last issue (though possibly related to the previous one):

while (j &lt; seq_size)
{
    ...
    temp_seq[j+1] = ...;
}


By entering the loop with j == seq_size-1, you'll be writing beyond the boundaries of temp_seq.

Your code might be working correctly for some input, but beware that it does look suspiciously unsafe.