• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mock

 
Shalini Srivastav
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Could anyone explain how & can be used with integral type ?
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"&" can be used for bitwise operations. More about it here.
 
Ankit Gareta
Ranch Hand
Posts: 67
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shalini,

It seems 3rd and 5th are right, I can't understand why its seems green at 2.
please , can some one explain it ?

Thanks,
Ankit
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ankit Gareta wrote:Hi Shalini,

It seems 3rd and 5th are right, I can't understand why its seems green at 2.
please , can some one explain it ?

Thanks,
Ankit

Please read my earlier reply and the link I have given therein.
 
Ankit Gareta
Ranch Hand
Posts: 67
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Mohamed

I got why 2nd answer is right, but i can't get why the 5th answer is wrong ?

Thanks,
Ankit
 
Ankit Gareta
Ranch Hand
Posts: 67
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got it, ~ can't have boolean operand.

Its so silly,

thanks Mohamed.
 
Shalini Srivastav
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The unary bitwise complement operator "~" inverts a bit pattern; it can be applied to any of the integral types, making every "0" a "1" and every "1" a "0".
 
Mansi Agarwal
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shalini,

Want to know which software / website you are using to take exam in this format?
 
Shalini Srivastav
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mansi Agarwal wrote:Hi Shalini,

Want to know which software / website you are using to take exam in this format?


This is enthuware JP 7.
enthuware.com/
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shalini Srivastav wrote:
Mansi Agarwal wrote:Hi Shalini,

Want to know which software / website you are using to take exam in this format?


This is enthuware JP 7.
enthuware.com/


In Future please UseAMeaningfulSubjectLine.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic