yes u can .. but m afraid it would be an infinite loop...
your test condition is: s!='\0')|| s!=' '
which means if any of these two conditions is true then overall condition will be true which means loop will be incremented...
Here is the Truth table for OR:
which means condition will only be false when both conditions are false.. i.e loop will break only when s='\0' as well as =' ' at the same time .. which is not actually possible...
but if u want loop to be terminated.. then.. use AND
truth table for AND is:
which implies condition will fail if any 1 of the condition is false.. i.e if s='/0' or ' ' any of these..
hope u get it..
- Snehil :)
hey guys...thanks for the replies...I'm sorry to have put tht kinda inexplicable code...actually tht loop is gonna traverse down the array n not up/// anyway i jst wanted to knw whether i can hv a test condition with a '||'...thanks a lot