what does (int &int) mean ?
-
Dear friends, I do not know what (int & int ) mean?
I thought it will be either true or false according as the value 0 or something else. But here, this is not the case.
Would you please write the answer and make it understand?// program : prog #include<stdio.h> #include<stdlib.h> int main (int argc, char** argv){ int x = atoi(argv[1]); int y = atoi(argv[2]); printf("your integer: %i! \n",(x&y)); return 0;}e.g : ./prog 2 17 =>2 , ./prog 2 18 => 2 , ./prog 4 18 => 0, ./prog 31 32 => 0
How is the result calculated here?
Thank you so much in Advance !
Euklid
-
& is the binary and, google for binary operators. The logical and (the one that's either true or false) is &&.
-
ok ! Thank you so much for the answer! I understood now !!
Hier is the answer:
http://en.wikipedia.org/wiki/Bitwise_operation#AND
with best wishes