+ 1
What is wrong in my code??
go to code and tell me the difference between line 1 and line 2(both lines given in code) https://code.sololearn.com/c3YnbsJsiitr/?ref=app
10 Antworten
+ 2
logically speaking, the line 1 is more appropriate, since you're check "p" first (p may contain NULL) before the second sub expression gets called. ( as the "&&" operator is part of short-circuit evaluation. thus, will guarantees that the second sub-expression will never be called if the first sub-expression evaluates to false)
+ 5
Both lines are statement so you should keep in comment.
+ 5
Prakhar There is no difference in both line only statements are different.
If you will not comment the both line then exception will come.
+ 3
Prakhar Outputs are coming same. May I show you through video?
+ 2
Prakhar Check here. Outputs are coming same.
https://www.sololearn.com/post/237167/?ref=app
+ 2
Prakhar Don't confuse me. It's working fine. I have shown you in video also.
+ 2
Prakhar Make a video through screen recorder and share here.
0
Bro I want to ask is there any difference between line 1 and 2 ..if no? then erase one of them one by one and find the output..And if there is difference between lines then tell me please..
0
If there is no difference between the lines then first erase line 1 and find output and then erase line 2(keeping line 1) and find the output both will be different even after line 1 and 2 are same.. I want to know this.. Why this happened..
0
There are two lines marked as //line 1
&//line 2,first erase the statement marked as //line 1(notice output) now,
(Press back again come to code via link) this time erase the statement marked as //line 2(notice the output)..
Both are different