• Post Reply Bookmark Topic Watch Topic
  • New Topic

operators  RSS feed

 
quan zhu
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From CD in Simon Roberts book:
Q)Which of the following lines of code, considered individually, compile(s) without error? Choose all correct options.
A) int i=1; int j = &simi;
B)int i=1; int j = !i;
C) boolean b = true; boolean c = &simb;
D) boolean b = true; boolean c = !b;
Correct selection is: A, D
explain: The &sim operator performs bitwise inversion on integral types; it may not be applied to boolean data. The ! operator inverts boolean values; it may not be applied to integral types.
I do not understand what is a &sim operator. Helps?
Thank you.
 
ego hu
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is ~.
Just a typo.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!