1331com银河游戏

ƽ̨ûĻоѡصģ1C 2Cʾλ罫ijֵλ 3C԰λ 4C λ λ +-*/ ȼô 6cԵ 7CУ2ƣ2ƣɶ˼ϸͣ 8cλ 10Cеƺƣ
ƽ̨û 2018-06-06 17:03:22

Ǿѡƽ̨ûʱ

aabaabaab001
aabaabaab001


aabaabaab001C

#include"stdio.h" void main() {char ch; ch='e'; ch<<4; printf("%c\n",ch); } нe #include"stdio.h" void main() {char ch; ch='e'; ch=ch<<4; printf("%c\n",ch); } нP <<ԽASCIIֵƣд... #include"stdio.h"

void main()
{char ch;
ch='e';
ch<<4;
printf("%c\n",ch);
}
нe
#include"stdio.h"

void main()
{char ch;
ch='e';
ch=ch<<4;
printf("%c\n",ch);
}
нP
<<ԽASCIIֵƣд<<ơλ2нҲȫ鷳ϸһ°
Ľѱ4516˵
void main()
{char ch;
ch='e';
ch<<4;//ch24λûаֵchchԭֵ䣬int a = 5; a - 1; a5԰ɣ Խe
printf("%c\n",ch);
}

void main()
{char ch;
ch='e';
ch=ch<<4;//chascll101,ת2011001014λ01010000,ת1080ǴдPascllֵԽP
printf("%c\n",ch);
}
һα༭ʱ Ƽ2017-11-22 13:48:46
ֻ֪
ֻ֪


ֻ֪ѣCʾλ罫ijֵλ

Ľѱ2474˵
λ"<<"  ">>"

ٸӣa2λȻ󸳸a
a<<=2 Ҳa=a<<2

C1λ൱ڳ2൱ڳ2
һα༭ʱ 2010-09-02
ѧǹ㶫
ѧǹ㶫


ѧǹ㶫C԰λ

C԰λ<<ô?ʱλȥ?ƶһλ?
Ľѱ8133˵

CаλƵΪ<<£

ڲa<

1 նֵÿλλ(д)ƶnλ

2 λ(ߵ)nλȥ

3 λ(ұ)n0.


char;£

һ

0x12 << 3 =>

B00010010 << 3 =>

B10010 000(λ0ȥƣλ0) =>

0x90

0x12 << 3 = 0x90

0x9E << 2 =>

B10011110 << 2 =>

B01111000 (λ10ȥ,λ0)=>

0x78


Աд³֤

#include 
void check(char a, int n)
{
    printf("0x%hhx << %d = 0x%hhx\n", a, n, a<}

int main()
{
    check(0x12, 3);
    check(0x9e, 2);
    
    return 0;
}

нΪ

0x12 << 3 = 0x90
0x9e << 2 = 0x78

ԿǼġ

һα༭ʱ Ƽ2017-09-14 12:08:43
binlaniua
binlaniua


binlaniuaC λ λ +-*/ ȼô

Ľѱ1353˵
Cʹõȼͽԣ 
ȼ
() () [] -> .
! ~ ++ -- + - * & sizeof
* / %
+ -
<< >>
< <= > >=
== !=
&
^
|
&&
||
?:
= += -= *= /= %= &= ^= |= <<= >>=
() ,
ָsizeof[]ȵ

һֵ
ֵǰijʽֵֵһΪ=ﲢǵڵ˼ֻǸֵá==ʾ
ע⣺ֵߵıڳطҪ
ѸֵıdzΪֵΪdzڸֵߣֵıʽdzΪֵΪdzڸֵұߡֻΪֵ

count=5;
total1=total2=0;
һֵҶ⡣
ڶֵ˼ǰ0ͬʱֵΪֵǴģҲ˵Ҷ˿ʼ㡣total2=0;Ȼtotal1=total2;ôвأ
(total1=total2)=0;
DzԵģΪҪģʱtotal1=total2һʽֵDzʽڵġ


CĿ˫Ŀ

+ Ŀ
- Ŀ
* ˷
/
% ȡģ
+ ӷ
-
һЩֵӣ ڸֵҲıʽоʹ
Area=Height*Width;
num=num1+num2/num3-num4;
Ҳи˳⣬˳ӼĿ͵Ŀ㡣
ȡģ(%)ڼõ磺
a=7%4;
aĽ3Ϊ7%43
ôҪˣҪǵôأ
b=7/4;
bǵˣӦ1
Ҳ˾Ͳˣ7/4Ӧ1.75ô1أҪ˵ǣʱõĽȻûС֡ҪҲõС֣д7.0/47/4.0ҲһΪ
ôһʵõأҪǿתˡ磺
a=(int) (7.0/4);
Ϊ7.0/4ֵΪ1.75ǰ(int)ͱʾѽǿתͣ͵õ1ô˼һa=(float) (7/4);aĽǶ٣
Ŀ൱ȡ෴ֵֵͱΪֵǸͱΪֵ
Ŀû壬Ǻ͵Ŀһõġ

߼
߼ǸݱʽֵֵǼֵʵCûνֵͼֵֻΪ0Ϊֵ0Ϊֵ

&& ߼
|| ߼
! ߼

5!3;
0||-2&&5;
!4;

ʽ&&ʱֻҪһΪ٣ܵıʽΪ٣ֻежΪʱܵʽӲΪ档ʽ||ʱֻҪһΪ棬ֵܵΪ棬ֻееĶΪʱܵʽӲΪ١߼(!)ǰӦıתΪӦ/ֵԭΪ٣߼ԺΪ棬ԭΪ棬߼ԺΪ١
һҪһ߼ʽĺһֵȡֵӰʽֵʱһ־Ͳˡ磺
a=2,b=1;
a||b-1;
Ϊa=2ΪֵԲb-1DzֵܵıʽһΪֵʱıʽͲټˡ

ġϵ
ϵǶʽбȽϣһ/ֵ

>
< С
>= ڵ
<= Сڵ
==
!=
ЩҶףҪǵ==͸ֵ=ˡ
һЩտʼѧϰCԵǶŪףһЩϳԼʱҲĴ룺
if(Amount=123)
ܶ˶ΪAmount123ôʵд˼ȸֵAmount=123ȻжʽDzֵΪΪ 123ֵôġõAmount123ʱӦif(Amount==123)

塢Լ
һ++Լ--ԱIJ1ͼ1磺
--Couter;
Couter--;
++Amount;
Amount++;

Щǰ滹ںԱӰ춼һģǼ1߼1ǵΪʽһ֣߾ˡڱǰ棬ô֮ǰԼ㣻ں棬ôԼڱμӱʽ㡣̫ܲӣ
num1=4;
num2=8;
a=++num1;
b=num2++;

a =++num1;ܵһֵ++num1ֵaΪڱǰ棬num11Ϊ5ȻֵaaҲΪ5b=num2++;ǰnum2++ֵbΪڱĺ棬Ȱnum2ֵbbӦΪ8Ȼnum21Ϊ 9
ôôأ
c=num1+++num2;
c=(num1++)+num2;c=num1+(++num2);ҪݱͬıвͬĽԺı̵УӦþ渴ӵ

ϸֵ
ڸֵУһC/C++еĸϸֵʵһдʽʹöԱĸıΪࡣ
Total=Total+3;
էһд룬ƺ⣬Dzܳġʵӣ'='Ǹֵǵڡ˼DZֵ3ȻڸֵΪ˼򻯣ĴҲдɣ
Total+=3;
ϸֵЩ

+= ӷֵ
-= ֵ
*= ˷ֵ
/= ֵ
%= ģ㸳ֵ
<<= Ƹֵ
>>= Ƹֵ
&= λ߼븳ֵ
|= λ߼ֵ
^= λ߼ֵ
ʮϸֵУǵԺλʱ˵
ôĸϸֵ˾ͻʣTotal=Total+3;Total+=3;û𣿴еģA=A+1ʽAΣڸA+=1ʽAһΡһ˵ڳûжӰ죬ǵʽΪķֵʱͱ(Ժ˵)ʹͨĸֵҲӴĿʹЧʽ͡

ߡ
(?:)CΨһһĿǶԵһʽ/ټ⣬Ȼݽʽеһ
<ʽ1>?<ʽ2>:<ʽ3>
УȶԵһʽм飬Ϊ棬򷵻رʽ2ֵΪ٣򷵻رʽ3ֵ

a=(b>0)?b:-b;
b>0ʱa=bb0ʱa=-bʽʵ˼ǰbľֵֵa

ˡ
CУʽöŷֿöŷֿıʽֱֵ㣬ʽֵһʽֵ
b=2,c=7,d=5,
a1=(++b,c--,d+3);
a2=++b,c--,d+3;
ڵһд룬ʽöŷֿյֵӦһʽֵҲd+3Ϊ8a=8ڵڶд룬ôҲʽʱʽΪa2=++bc--d+3,(Ϊֵȶȼ)ձʽֵȻҲΪ8a2=3

λ߼λȵȣǵȵλʱ˵

šȼͽ
ĶǸӿԿЩʱһ˳򣬾ͺҪ˳ӼһȼͽҪԣֳΪ˳ɱʽĸǷԼʲôʱ㡣
һα༭ʱ 2008-07-25
wy448762577
wy448762577


wy448762577cԵ

temp=0x01; for(i=0;i<8;i++) { P1=~temp; delay(1500); temp<<=1; } Ϊʲô 1111 1110 1111 1101 1111 1011 ..... Dzǰǰ1õ棬Ȼݶǰ... temp=0x01;
for(i=0;i<8;i++)
{
P1=~temp;
delay(1500);
temp<<=1;
}
Ϊʲô
1111 1110
1111 1101
1111 1011 .....
Dzǰǰ1õ棬Ȼݶǰһλ

ȷĻΪʲôȷ
temp=0x7F;
for(i=0;i<8;i++)
{
P1=temp;
delay(100);
temp>>=1;
}
Ĵ 0111 1111 0011 1111 0001 1111ġ
Ϊʲô
~tempֻ󷴲ıtempֵ  ϸ˵ҿ
Ľѱ5796˵
1һĸλȫλ
2磺
aĶ2λҲ0a=15000011112λ00111100ʮ60Ϊ8λʾʮ1516λʾһģ
һα༭ʱ Ƽ2017-10-05 19:42:39



ңCУ2ƣ2ƣɶ˼ϸͣ

Ľѱ4323˵
仰˼ǣ һʵʩƲ=2 һʵʩƲ=2

ǼĶƲ˲Cԣ ʵϾԶ֧

ף
һʮƵģڵ涼԰Ʊʾ 8 ƾ1000. һλ1000 << 1 = 0001 0000 = 16, ˾=82ͬһλ 1000 >> 1 = 0100 = 4, 82.

һʮaΪ˵ ܿԱʾɣ a = a[n-1]*2^(n-1)+a[n-2]*2(n-2) + .... a[1]*2^1 + a[0]+2^0; a[n-1]....a[0]ȡֵΧ01һλȨϵ a[i] << k; a[i] -> a[i+k]; Ĺֵ2^i -> 2^(i+k) = 2^i 2^k, ƵÿһλͱŴ2^kk=1ʱ򣬾ǡ2ͬƾǡ2^k.
һα༭ʱ Ƽ2017-09-19 21:41:19
sparkyou
sparkyou


sparkyoucλ

arr[]={0xf0,0x0f,0xff,0x00};
arr[0]<<=1; //˼0xf0һλarr[0]=0xe0һλarr[0]=0x0f ????
Ľѱ1222˵
arr[0] = 0xf0;
¥ֻDZʮԻ˶ѡ

дأarr[] = {1, 2, 3, 4};
arr[0] <<= 1; ¥
һģһλָarr[0]λϵ֣һλŴ

׷

arr[0]0xe0?

׷

ǵġ
0xf0Ķ1111 0000һλԺ1 1110 0000
Խ0x1e0

׷

unsigned char8λ

׷

arr趨unsigned charint

׷

unsigned char

׷

뵱ȻζintˡȻunsigned charôλˣ0xe0˵û

׷

һα༭ʱ 2014-07-18
davidlovelucy
davidlovelucy


davidlovelucyCеƺƣ

C<<ʾ2>>ʾ2ɼԭµģҪ7Ϊ0111һλ3.5֮00113һģأ̸֣
Ľѱ922˵
λ͵ġλʽֵҲ͵ģңλλ㲢Գơ
һα༭ʱ Ƽ2017-09-09 23:39:37
网站地图

银河1331官网