operator tag

28 questions


1 answers
156 views
0
+= operator in Java

As far as I know, i+=j; and i=i+j have the same meaning int i = 5; long j = 8;If I = i+j;, it can't be compiled. If I = j;, it runs well I wonder why.


1 answers
85 views
0
What do you call an operator?

How does the next code run?It's my first time seeing it in C grammar when I think it's going well in GCC ㅜㅜWhere's that thing?What's that called?#include <stdio.h>int main(){ int x = 10; while (...


1 answers
72 views
0
--, Do ++

There is no posterior operator in Python, but there is a potential operator?So I used it, but the price doesn't increase.Why doesn't Python support front and rear increments like C++?a = 1++aprint a


1 answers
135 views
0
Which one should I use, malloc or new?

In C++, there are many ways to dynamically allocate, right?Then when should I use malloc and when should I use new?malloc If you finished freeIf new is done, deleteI know I shouldn't mix the two.


1 answers
137 views
0
&&& What is doing?

If you compile the code below into the gcc -Wall /-Waddress option,warning: the address of ‘i’ will always evaluate as ‘true’ [-Waddress]It appears.I don't know why it's coming up. I don't know what i...


1 answers
73 views
0
=! What is the operator?

!I'm asking =! not =.We didn't even assign a value in the code belowWhy is false coming out?int main(){ int a; int b = 3; return if(a =!b) { //false cout << a =! b is true! << endl; } els...

2 years ago

1 answers
112 views
0
It's weird to compare integers with is

When running Python 2.5.2>>> a = 256>>> b = 256>>> a is bTrue # Of course it's true>>> 257 is 257True # If you compare 257 directly, it's true>>> a = 257&g...


1 answers
79 views
0
What does "void *p = &&abc;" do?

void *p = &&abc;I saw a code like this, but I don't know what it's doing. I've seen a lot of double pointers, but doesn't & mean the address?And you need two operands, so this isn't it.Wha...

2 years ago

1 answers
69 views
0
What does the ^ operator do in Java?

What is the work of a operator in Java?For example, if you do an operation such as inta=5^n;Operator does When n is 5, the value is 0When n is 4, the value is 1When n is 3, the value is 3I don't think...


1 answers
129 views
0
What are the two colons in Ruby doing?

What does :: do in Foo::Bar?I thought it was related to encapsulation (private, protected), but it's not that when I looked at the definition.The :: is a unary operator that allows: constants, instanc...

2 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.