+ 1
In if statement ,if there is 1as condition,what would happen? And if contion is x&&y|| z what would happen
2 Respostas
+ 12
since &&,|| (logical operators) have associativity from Left to Right & precedence is same so the expression will be treated as :
(X&&Y)||Z
//where X,Y,Z are conditions
+ 5
If X and Y are True statement is True, because first statment is True and and second is not execute because is or .
If X and Y are false, first statment is False, and second statment deciding that statment is True or False
If z is false all statment is false,
And if true all statment is true.