I am not sure of that you just stated. Below is a small program where I tested a C function which searchs for longest common substring, a question arised by peter budo about a week ago.
Actually I also had some problems with clock() taken from time.h. I did a somewhat practical calibration for the execution time shown after the end of the program was always around 2 seconds in total. This is very close to the computed value of 1.75 seconds what resulted from clock()-values (ends minus starts) divided by CLOCKS_PER_SEC, see below.
Well well well...
I was wrong..:$
i am so sorry to all friends..
The code in my question is correctly working one . .
It gives you the perfect time consumption gyz..
I am very sorry for this thread . . :(