程序員面試寶典學習總結1(每篇20個)

1 &跟&&的區別 &爲按位與運算;&&爲與運算,返回一個布爾值。 X=3,y=4,則x&y等於0;x&&y等於1(x跟y同爲真時返回1) 2局部變量與全局變量 #include<iostream> using name spacestd; int vac=3; int main() { int vac=10; ::vac++; cout<<::vac<<endl; cout<<vac<<enl;
相關文章
相關標籤/搜索