What do the operators of , etc. mean?

Updated on technology 2024-05-20
5 answers
  1. Anonymous users2024-02-11

    n |= 1 is equivalent to n = n | 1

    Operator |It's bitwise or arithmetic, you can write two operands as binary first, and then look at them, for example, binary numbers.

    11(b) |1(b) -11(b); 1(b)|10(b) -11(b); 1010(b)|101(b)->1111(b)

    In short, as long as one of the two corresponding bits is 1, then the resulting bits are one.

    is the left-shift operator means that all bits are shifted to the left by n bits, e.g. 11(b)<<1 ->110(b);

    1010(b)<<3 ->1010000(b)

    n |= 1 <<7 is to shift 1 to the left by 7 bits (i.e. 10000000(b) = 128(d)) and then make a bitwise OR with n.

    i.e. give n position 7 1).

  2. Anonymous users2024-02-10

    n |= 1 can actually be written n = n | 1;

    Operator |It is a bitwise or operator that is converted to binary first.

    For example: 9|5 The writable equation is as follows:

    00001101 (13 in decimal) can see 9|5=13 As long as one of the corresponding two binary digits is 1, the resulting digit is 1.

    The shift left operator" "e.g., 2<<2 refers to moving each binary of 2 to the left by 2 bits.

    For example, 2=00000010 (decimal 2), and the left shift of 2 bits is 00000100 (decimal 8).

    This is more efficient than 2 * 2 * 2.

    If there is anything you don't understand, you can study it carefully. I wish you a good time soon.

  3. Anonymous users2024-02-09

    : is an operator in C++.

    It is the highest ranking of operators, and it is divided into three types: global scope, class scope, and namespace.

    Scope. 1) Global scope.

    indicates the class to which the member function belongs. For example, m::f(s) means that f(s) is a member function of class m.

    2) Class scope.

    For example, if a class A is declared, and a member function void f() is declared in class A, but f is not defined in the class declaration, then when defining f outside the class, it should be written as void a::f(), which means that this f() function is a member function of class A.

    3) Namespace scope.

    Indicates a reference to member functions and variables.

  4. Anonymous users2024-02-08

    Indicates the scope and affiliation.

    is an operator. It can be divided into the following three types:

    1. Global Scope, Usage(::name)2, Class Scope, Usage(class::name).

    3. Namespace Scope (namespace.

    Scopes), usages (namespace::name), they are all left-associativity, and their purpose is to call the variable you want more clearly, such as a global variable somewhere in the program.

    a, then it is written: a;

    If you want to call the member variable A in class a, then write it as a::a, and if you want to call the cout member in namespace std, you write it as std::cout (quite careful about using namespacestd; cout) means that here I want to use the cout object is the cout in the namespace std (i.e. the cout in the standard library).

  5. Anonymous users2024-02-07

    Stands for less than sign (

    Represents greater than sign (>) represents less than or equal to the symbol ( ) represents greater than or equal to the symbol ( ) are some of the symbols that punctuate in computer languages such as"amp "is &"lt"That is, a symbol is first and foremost a symbolic object, which is used to refer to and represent other things. Secondly, the symbol is a carrier, which carries the information sent by both sides of the communication.

    In symbols, there are both sensory materials and spiritual meanings, and the two are inseparable and unified. For example, traffic lights at intersections are no longer meant to illuminate people, but rather to represent a kind of traffic regulation. This connection between the sign and the reflected object is achieved through meaning.

    Symbols always have meanings, and meanings are always expressed in the form of certain symbols. The constructive role of symbols is to establish a connection between perceptual signs and their meanings, and to present this connection in our consciousness.

Related questions
19 answers2024-05-20

: has a higher priority than =

Below << >>>More

11 answers2024-05-20

Boolean logic operators are used to represent a logical relationship between two search terms to form a concept. >>>More

16 answers2024-05-20

The operator priority should be at the end of each C textbook with a table, according to which you should choose! Not.

10 answers2024-05-20

Dizzy, the manager of the fifth level above, seeing that your level is quite high, why don't you give a decent answer? It's like a fortune teller. Nothing.

7 answers2024-05-20

+ Follow the right binding rule;

a=++i++;Equivalent to int temp=i++, a=++temp; >>>More