Home > Back-end >  Excuse me, && symbols and & difference in where
Excuse me, && symbols and & difference in where

Time:09-29

Don't know much about novice a
There is a problem
Why
The scanf (" % d, % d, % d ", & amp; A, & amp; B, & amp; C);
I deleted & amp; The results of this shipment is out
A total of two problems to solve, thank you

CodePudding user response:

& & Is the condition judgment, a& & B, at the same time satisfy the a and b, you this & amp; Is the pick up address and, in some cases, is a bit operations, such as c=a & amp; b;

CodePudding user response:

Bit operation don't understand what is,,,

CodePudding user response:

reference 1st floor ggglivw response:
& amp; & Is the condition judgment, a& & B, at the same time satisfy the a and b, you this & amp; Is the pick up address and, in some cases, is a bit operations, such as c=a & amp; b;

If & amp; & The mean condition judgment
Which use the if judgment is not good

CodePudding user response:

& & And can be simply interpreted as meaning, such as the if (a & gt; 0 & amp; & a<10); In the words of pop is a greater than 0 and a less than 10 (two conditions at the same time satisfy) is true
These are the basic knowledge, it is suggested that reading a book

CodePudding user response:

I first saw you want to become in address address, a sudden thought, this address in the address afraid didn't get it, wondering that come in and see, see the answer on the second floor, it is very stiff

CodePudding user response:

reference 5 floor thousand dream life reply:
I first saw you want to become in address address, a sudden thought, this address in the address afraid didn't get it, wondering that come in and see, see the answer on the second floor, it was very stiff


Answer what problem? Where description is not clear?

CodePudding user response:

refer to 6th floor ggglivw response:
Quote: refer to fifth floor response: thousand dreams life

I first saw you want to become in address address, a sudden thought, this address in the address afraid didn't get it, wondering that come in and see, see the answer on the second floor, it was very stiff


Answer what problem? Where description is not clear?

Ah, I mean, I, knowledge is not enough, so that all can not think of this & amp; & And the meaning is

CodePudding user response:

& & On both sides equal to "and" in mathematics, to true, only true expression, that logic in C language,
& There are two types of usage:
1. As a unary operator (operand has a), mean address, such as & amp; A, is to take the address of the variable a, p=& amp; a; Is the address to access the variable p variable a,
2. As a binocular operators (two operands), which means "bitwise and operation", which is about the two operands a a manner "and" operation (1 & amp; 1=1 and 1 & amp; 0=0 this), such as: a=3 & amp; 4.==& gt; 11 & amp; 100=0, so a memory is 0, the & amp; & Are means about the same, and operation (1 (true) on both sides, the results for 1 (true)), is a logical true and false, only one is a value of 0, 1.

As to the problem of the scanf parameter address (only one on the right side of an operand, to take its address), remember that good,
The parameters of the scanf function requires the use of variable address, with the ability of the original poster now, should not so good understand why (involves the scanf function and pointer)

CodePudding user response:

& & And is
& Is a variable or function address

CodePudding user response:

& Applied to an operation, can also be said address, & amp; & Is the meaning of "and"

CodePudding user response:

Thank you very much, I have a doubt, a unary operator and binocular operators is the first time heard this word, and then about you write==& gt; I have not seen the
I have seen & gt;=and & lt;=
What you said & amp; I see, the first meaning is p=a address
If a=1
P=a=1
Which is why written p=& amp; A
So do not even the p=1

About & amp; & I just understand this mean and mean
Well, or you can write, I a> 10 and b<6, can perform bottom go to, if it can perform is to accord with conditions on both sides, for the expression [is]

This is my understanding of the above

CodePudding user response:

A unary operator and binocular operators concept to baidu
He said the==& gt; Instead of the operator is equivalent to the meaning of
Address operator this is combined with a pointer, the pointer is a difficult
For p=& amp; A p deposit is not 1 but the address of a
About & amp; & The understanding of the meaning, it is recommended that the logical operation under study

CodePudding user response:

Because few common symbols, and need to the operation of the said there are a lot of,
There are many corresponding solutions,
One is the introduction of other language symbol, this let a person look very confused, only in minority areas to adopt this way, (a character a righteous)
Second, like c, the combination of using symbols, and symbols of overloading, (what a character, a character polysemy)
Leave me alone, for several days before written reply, forgot what to write, is pick up points,

CodePudding user response:

& And & amp; & Used for relational operators, & amp; Operator about two expressions are calculated, and then to solve, is essentially a and operation, are TRUE/FALSE, before and after is 0, 1 with & amp; & If the left expression results to FALSE, no longer calculation expression on the right side, when the left is really only calculate the right

The scanf (" % d, % d, % d ", & amp; A, & amp; B, & amp; C);
I deleted & amp; The results of this shipment is out

Should be a compiler error, the request parameter is the address of storage integer variables, int a [3], a, a + 1, a + 2 can also be defined int a, b, c, it must be & amp; A, & amp; B, & amp; C

CodePudding user response:

reference 5 floor thousand dream life reply:
I first saw you want to become in address address, a sudden thought, this address in the address afraid didn't get it, wondering that come in and see, see the answer on the second floor, it was very stiff


Address in the address can also be some
int a;
Int * p_a=& amp; a;
Int * * p_p_a=& amp; P_a;

But direct & amp; & Don't set up a

CodePudding user response:

And double=3=, and so on symbols such as overlay, meet after more, see a lot of questions, (? ?? _???? )?

CodePudding user response:

& Is take the address,

CodePudding user response:

"The scanf (" % d, % d, % d", & amp; A, & amp; B, & amp; C); "In" & amp;" Is take variable address symbol, said means: to input the data into the variable,
When & amp; As a sign of operation, "& amp; & amp;" Is the logical "and", "& amp;" Is a bitwise and,

CodePudding user response:

Where is the watch with, the binary & amp; Is and operations have 0 to 0, 1 to 1; Monocular operation & amp; The address is, Binary operator & amp; & And the meaning is, before and after meet to 1, 0 is not behind the judgment before directly 0 (false)

CodePudding user response:

& Is a sign of operation: a & amp; B is similar to
& & Is judgment symbol: the if (a & amp; & b)

CodePudding user response:

& Is a sign of operation: a & amp; B is similar to
& & Is judgment symbol: the if (a & amp; & B)
Good

CodePudding user response:

Thank you very much, I have a doubt, a unary operator and binocular operators is the first time heard this word, and then about you write==& gt; I have not seen the
I have seen & gt;=and & lt;=
What you said & amp; I see, the first meaning is p=a address
If a=1
P=a=1
Which is why written p=& amp; A
So do not even the p=1

About & amp; & I just understand this mean and mean
Well, or you can write, I a> 10 and b<6, can perform bottom go to, if it can perform is to accord with conditions on both sides, for the expression [is]

This is my understanding of the above

nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related