Why is this code not working?

Why is this code not working?


hello @cbcao263
image

interchnage the position of these two conditions

Sir, Why it is creating issues.
First time it happened with me and literally shocked with this condition.

and condition get checked from left to right.

so first we need to check for fast!=NULL condition and then after fast->next!=NULL

let say our fast is NULL and if we try to check conditions in this order
fast->next!=NULL && fast!=NULL
then first fast->next!=NULL will be checked but because fast is NULL we cannot do NULL->next!=NULL ,hence it will give error.

Okayy Sir, Thanks a lot for this one.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.