what will be the output of the following code =. int a,b,c,d a=10; b=15; c=25; d=!(c greter than b&& b greter than a)
Answers
Answered by
25
Answer:
In Java - there will be error cannot convert boolean to type int
In python - value of d will be "false"
in c - the value of d will be "0" (zero)
in c++ - the value of d will be "0" (zero)
Explanation:
- Java is Strictly typed language so if you want convert from one data type to other you have to used predefined method
- Python is loosely typed language in python we can directly assign a value to a variable without initializing
- in c actually the value of the statement !(c > b && b>a) will be false but it is being stored in a int type of variable so in binary false will be zero and true will be one so here it is false so value zero will be stored in d variable
- same c explanation works with c++ also
----Hope you liked my answer,if you liked my answer mark it as brainliest,it would really help me. :)
Answered by
1
Answer:
gg lime juice and seek in the last one near the end of the asteroids green light to moderate to heavy rain here is the other one is it possible to
Similar questions