-
It's simple: you can't write it in C++, I write it in C.
**As follows. #include ""
void main()
int x=20,w=30,y;
printf("%d",~x&w);
The result is 10 is and, is the negation.
Except for 1+1=1, the rest are equal to zero.
Replace 1 with 0 and 0 with 1
Calculate the lower 8 bits;
20 is 0001 0100
30 is 0001 1110
20 is 1110 1011
o(∩_o...Ha ha.
-
x=20 in memory is 0000 0000 0000 0010w = 30 in memory is 0000 0000 0000 0011, then x is 1111 1111 1111 1101 in &w is 0000 0000 0000 0001 (that is, 10), so y is 10
I don't have a compiler at home to test it.
I don't remember if the order of operation of sum & is left to right or right to left, anyway this is the idea :)
-
Bitwise operations are not supported in C++, so X is wrong!
-
Put it in the denominator, bring out a, and then reduce it.
-
- -a =1;a=1; b + = 3;b=4; (a) +b + = 4; -c = 3;c=3;
-a) +b + c = 1; (b + = 1) => (b = b + 1=5)
So the answer is a=1 b=5 c=3
The yes or symbol you just asked, non-zero equals 1, e.g. 3|4=1, your question is a bit wrong, -a + b++ c is a whole, and the four operators have the highest priority, |It should be ranked last, and if you don't understand, you can ask again, thank you.
-
--c preceding --, immediately changes the value of c, which is 1b++ and posterior ++, in this equation, the value of b is still 3 and does not change, and b will become 4 after the operation after the equal sign
The --, in front of c immediately changes the value of c, which is 3, so it becomes.
b+=1+3-3 where b has become 4.
i.e. b=4; b+=1;So b is 5
What should be noted here is the difference between the front ++ and the rear ++, you can try to replace b++ with (++b) and the final result is 6.
-
b += --a + b++-c);Add parentheses to compile in vc++ 2005.
i.e. b=b+--a+b++-c).
4 There is --a, b++, c in the above equation, so after execution, a=1, b=5, c=3
-
It is important that you understand the priority of the operator: the self-incrementing operator" plus and minus the operator, so the program execution process is like this: first a self-subtract 1 and then a==1;Then b adds 1 at this time b==4, c subtracts 1 at this time c==3, and finally b+=1+4-3, the leftmost b==3 in this process, when this process is executed, b=3+(1+4-3)=5;
It's detailed.
-
6 * 103 4 rounded.
133 % 4 remainder.
Then subtract 153
-
The result is 3. (a=1,a++,b=1,a&&b++) is a comma expression, and its value is =a&&b++=1, so the value of the whole expression is a+1=3
-
Something completely meaningless.,Why don't you study it?。。。
Could it be that the computer output you a garbled code that day, and you still have to study the composition of this garbled code, embarrassment.
If you want to ask why, ask the guy who designed the C language.
-
This kind of program is meaningless, and the results will vary depending on the compiler.
-
int a=2
char b='a'Your original ** is wrong, then a+b+2 5= 99
This involves the automatic conversion of C++ types, for comparison: 2 5 = 0; = ;
The division of two shapes is still an integer, so it is 0 after rounding;
So a+b+2 5= 99
First of all, a Class C has 254 addresses but there is always one as a gateway route, so there can be a maximum of 253 hosts. Then these hosts are public IP addresses. It can be done by setting up a LAN and using one IP. >>>More
2. 1, True 2, False (there is only one program) 3, False (not necessarily) 4, True. >>>More
This problem requires understanding that the system allocates memory to static variables when compiling, and the memory units occupied by them are not released after the function call ends, that is, the value of the variable is the value of the previous function call at the next function call. >>>More
1.When some software runs for the first time, you will be prompted to select an access point, either directly in the settings or in the settings of those networked software. >>>More
Is your "2012-07-23" a field? If you can directly use the substitution function to replace the year, month and day with "-", it will save trouble.