+ 1

What can replace the underscore? Help me with this

With what operator we can replace the underscore "_" in the if condition to print true ? if(_0) { printf("true"); } Follow/ message me for more mind blowing questions to discuss I m a curious Learning

16th Aug 2020, 12:04 PM
Paras Srivastava
Paras Srivastava - avatar
6 Respostas
+ 3
Use not operator ( !)
17th Aug 2020, 4:18 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 2
use ! it will change that 0 to 1.so the if statement will be true.
16th Aug 2020, 12:09 PM
BeastyDSK
BeastyDSK - avatar
+ 1
depends on language, but there is an expression with a boolean result, so everything that is equals to zero (or the result of it is true) // in Java int i = 0; if (i==0) { System.out.printf("true"); } //or eg if (0==0) {
16th Aug 2020, 12:38 PM
zemiak
+ 1
zemiak yes you are right on your side but it is asking for some operator as mentioned in question
16th Aug 2020, 2:04 PM
Paras Srivastava
Paras Srivastava - avatar
0
Krishnaprasanth D V what you think of ~
16th Aug 2020, 12:20 PM
Paras Srivastava
Paras Srivastava - avatar
0
hm but not in java
16th Aug 2020, 4:14 PM
zemiak