How was $T(N)$ derived for this function?
Here, $C_1$ and $C_2$ are constants that concern several instructions:

$C_2$ corresponds to instructions executed only once l &lt;- 0, the last executed test of while(A[l]!=NULL) and return l
$C_1$ corresponds to instructions executed several times: each test of while(A[l]!=NULL) but the last, and l&lt;-l+1. Those are executed a total of $N$ times.

We indeed get $T(N) = C_1\times N + C_2$.