@caswal, oh cool, i didn't know that, i thought if i did't put break, it would return true then go and return false also lol.
say if i did not put return true or flase but instead put cout << 1 for the other cases and cout << 2 for default and i did not use a break after cout << 1, then it would go and execute cout << 2 also right?
1. Why are you asking if it's valid syntax if it compiled? Trust the compiler. It is your friend.
2.
say if i did not put return true or flase but instead put cout << 1 for the other cases and cout << 2 for default and i did not use a break after cout << 1, then it would go and execute cout << 2 also right?
Why don't you go try it yourself instead of asking? Experimentation is a vital skill you'll have to develop