C++????????????
???????????? ???????[ 2014/11/7 14:14:29 ] ??????????????? C++ ?????? ????
????11.??8086 ????£?????????????????????????????Intel??
??????????ü??????????????????????????????μ???????*10H+??ü?????????????????????????????
????12.???д??BOOL??int??float?????????????a ??“??”???????
????????
????BOOL : ?? if ( !a ) or if(a)
????int : ?? ?? if ( a == 0)
????float : const EXPRESSION EXP = 0.000001
????if ( a < EXP&& a >-EXP)
????pointer :?? if ( a != NULL) or if(a == NULL)
????13.?????const??#define ?????к????
????1?? const ??????????????????????????????????????????????????????????顣????????????????滻?????????????飬??????????滻????????????????????
????2?? ??Щ?????????????????const ???????е??????????????????е????
????14.??????????????????
???????????????洢??????????????????飩????????????????????????????????????????顣
????(1)????????????
????char a[] = “hello”;
????a[0] = ‘X’;
????char *p = “world”; // ???p ??????????
????p[0] = ‘X’; // ??????????????????????????
??????????????????д char c = 'x'; p = &c;?????????????
????(2) ???????sizeof ????????????????????????????sizeof(p)??p ??????????????????????????????????p ??????????????C++/C ??????а????????????????????????????????????????????????????????????????д????????????????????????????
????char a[] ="hello world";
????char*p = a;
????cout<<sizeof(a) << endl; // 12 ???
????cout<<sizeof(p) << endl; // 4 ???
????????????????????????
????void Func(char a[100])
????{
????cout<<sizeof(a) << endl; // 4 ????????100 ???
????}
????15.????????????????????????????
????????
????a.????????????????????
??????1????????Χ???????????У???
??????2???????????????
??????3???????????
??????4??virtual ???????п????
????b.?????????????????????????????????
??????1????????Χ?????λ???????????????
??????2???????????????
??????3???????????
??????4??????????????virtual ??????
????c.“????”??????????????????????????????????????????£?
??????1??????????????????????????????????????????????????????virtual????????????????????????????????????????
??????2??????????????????????????????????????????????????????virtual ???????????????????????????????????????
????16.There are twoint variables: a and b?? don’t use “if”?? “? :”?? “switch”or other judgementstatements?? find out the biggest one of the two numbers.
???????????????????????????
????????( ( a + b ) + abs( a- b ) ) / 2
????17.??δ??????????????????????????????к??
????????
????cout << __FILE__ ;
????cout<<__LINE__ ;
????__FILE__??__LINE__????????????????????????????ж?????????????????????
????18.????ж???γ???????C ???????????C++????????????
????????
????#ifdef __cplusplus
????cout<<"c++";
????#else
????cout<<"c";
????#endif
????19.
????main ???????????????????????????δ????????????
???????????????????_onexit ??????????????????main ??????int fn1(void)?? fn2(void)?? fn3(void)??fn4 (void);
void main( void )
{
String str("zhanglin");
_onexit( fn1 );
_onexit( fn2 );
_onexit( fn3 );
_onexit( fn4 );
printf( "This is executed first. " );
}
int fn1()
{
printf( "next. " );
return0;
}
int fn2()
{
printf( "executed " );
return0;
}
int fn3()
{
printf( "is " );
return0;
}
int fn4()
{
printf( "This " );
return0;
}
The _onexit function is passed the address of a function (func) to be called whenthe program terminates normally. Successive calls to _onexit create a registerof functions that are executed in LIFO (last-in-first-out) order. The functionspassed to _onexit cannot take parameters.
?????????This is executed next.
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
??C++????????????C++ lvalue??rvalueC++11????????C++???????????????C++?е?????????????????C++?????????C++???Windows????λ??C/C++???????????????????JAVA??C??C++??????????c++??python???????????????????????????????C++???????C++?е????????C++????????????????C++ ???????????????C++?????????????????????C++????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????