tag:blogger.com,1999:blog-7258332205026269340.post2632855966267507880..comments2024-02-21T01:43:44.367-08:00Comments on Selenium-By-Arun: 52. Assignment and '?' operatorPriyanka Motoorihttp://www.blogger.com/profile/04643338373711611455noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-7258332205026269340.post-57486248633480758302017-05-25T11:50:46.060-07:002017-05-25T11:50:46.060-07:00@Chandan mohanty -
i=-10
i<0 is -10 < 0 ,...@Chandan mohanty - <br /><br />i=-10<br /><br />i<0 is -10 < 0 , which is true<br /><br />When it is true, from ?-i:i; , -i will be picked<br /><br />-i is -(i) i.e. -(-10) , which is nothing but 10<br /><br />Hence the output will be 10.<br />Arun Motoorihttps://www.blogger.com/profile/18156045285817519369noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-76509792177293769302017-05-24T23:50:22.337-07:002017-05-24T23:50:22.337-07:00i did not understand, as in above two program we h...i did not understand, as in above two program we have assigned value as 10 and -10 . How the output will be sameAnonymoushttps://www.blogger.com/profile/12850141491403255304noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-85354526359448844792016-11-18T21:17:22.478-08:002016-11-18T21:17:22.478-08:00@Dinesh and Sujji - Correct output is displayed. @Dinesh and Sujji - Correct output is displayed. Arun Motoorihttps://www.blogger.com/profile/18156045285817519369noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-75269779699374527912016-11-09T08:05:33.718-08:002016-11-09T08:05:33.718-08:00There is an error in last 2 programs output,both t...There is an error in last 2 programs output,both the outputs will be 10? plz clarify.sujjihttps://www.blogger.com/profile/11420212026233188257noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-67457785955715642452016-06-21T04:09:36.954-07:002016-06-21T04:09:36.954-07:00Hi Arun, as we have passed -10 (negative Value), s...Hi Arun, as we have passed -10 (negative Value), shouldn't the result be -10?<br />Please clarify B Dineshhttps://www.blogger.com/profile/08057183772508293953noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-12913833076863161552015-12-22T06:41:26.593-08:002015-12-22T06:41:26.593-08:00@aarkays - No, there is a difference. int i=10; is...@aarkays - No, there is a difference. int i=10; is mentioned in one of the program and int i=-10; i.e. positive integer value is passed to int variable in the first program and negative integer value is passed to int variable in second program.Arun Motoorihttps://www.blogger.com/profile/18156045285817519369noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-22342579047322494832015-11-24T09:55:33.546-08:002015-11-24T09:55:33.546-08:00Another Program to demonstrate the '?' ope...Another Program to demonstrate the '?' operator => you mentioned the same Arun.aarkayshttps://www.blogger.com/profile/01224250550854613144noreply@blogger.com