Segmented sieve, why is the res variable initialized with 1?


above res is initialized to 1 and the loop is not going up to the end value b , why?
according to me res should be initialized to 0 and the loop should loop till b.
Please Explain, thanks.