+2 votes
in Computer by kratos

State why are following expression invalid?

(i) asm = 5100 || val < 35

(ii) age > 70 && < 90

(iii) income >= 500 ||&& val < 500

(iv) res !> 20 ||! X > 20

1 Answer

+3 votes
by kratos
 
Best answer

(i) In this expression single ‘=’ operator is used for comparison which is not valid.

(ii) In this expression variable’* name is not mentioned after the ‘&&’ operator which is not valid.

(iii) In this expression both ‘||’ and ‘&&’ operators are written together which is not valid.

(iv) In this expression use of ‘!>’ is invalid and !x>20 should be written in parenthesis like (!x>20).

...