freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

華為c筆試題(編輯修改稿)

2025-04-20 23:11 本頁面
 

【文章內容簡介】 return dest。}int main( void ){ char str[] = 0123456789。 mymemcpy( str+1, str+0, 9 )。 cout str endl。 system( Pause )。 return 0。}本試題僅用于考查C++/C程序員的基本編程技能。內容限于C++/C常用語法,不涉及數(shù)據(jù)結構、算法以及深奧的語法??荚嚦煽兡芊从吵隹忌木幊藤|量以及對C++/C的理解程度,但不能反映考生的智力和軟件開發(fā)能力。筆試時間90分鐘。請考生認真答題,切勿輕視。一、請?zhí)顚態(tài)OOL , float, 指針變量 與“零值”比較的 if 語句。(10分)提示:這里“零值”可以是0, , FALSE或者“空指針”。例如 int 變量 n 與“零值”比較的 if 語句為:if ( n == 0 )if ( n != 0 )以此類推。請寫出 BOOL flag 與“零值”比較的 if 語句:請寫出 float x 與“零值”比較的 if 語句:請寫出 char *p 與“零值”比較的 if 語句:二、以下為Windows NT下的32位C++程序,請計算sizeof的值(10分)char str[] = “Hello” 。char *p = str 。int n = 10。請計算sizeof (str ) = sizeof ( p ) = sizeof ( n ) =void Func ( char str[100]){請計算sizeof( str ) = }void *p = malloc( 100 )。請計算sizeof ( p ) =三、簡答題(25分)頭文件中的 ifndef/define/endif 干什么用?include 和 include “” 有什么區(qū)別?const 有什么用途?(請至少說明兩種)在C++ 程序中調用被 C編譯器編譯后的函數(shù),為什么要加 extern “C”聲明?請簡述以下兩個for循環(huán)的優(yōu)缺點// 第一個for (i=0。 i++。){if (condition)DoSomething()。elseDoOtherthing()。}// 第二個if (condition){for (i=0。 i++。)DoSomething()。}else{for (i=0。 i++。)DoOtherthing()。}優(yōu)點:缺點:優(yōu)點:缺點:四、有關內存的思考題(20分)void GetMemory(char *p){p = (char *)malloc(100)。}void Test(void) {char *str = NULL。GetMemory(str)。 strcpy(str, hello world)。printf(str)。}請問運行Test函數(shù)會有什么樣的結果?答:char *GetMemory(void){ char p[] = hello world。return p。}void Test(void){char *str = NULL。str = GetMemory()。 printf(str)。}請問運行Test函數(shù)會有什么樣的結果?答:Void GetMemory2(char **p, int num){*p = (char *)malloc(num)。}void Test(void){char *str = NULL。GetMemory(amp。str, 100)。strcpy(str, hello)。 printf(str)。 }請問運行Test函數(shù)會有什么樣的結果?答:void Test(void){char *str = (char *) malloc(100)。strcpy(str, “hello”)。free(str)。 if(str != NULL){strcpy(str, “world”)。 printf(str)。}}請問運行Test函數(shù)會有什么樣的結果?答:五、編寫strcpy函數(shù)(10分)已知strcpy函數(shù)的原型是char *strcpy(char *strDest, const char *strSrc)。其中strDest是目的字符串,strSrc是源字符串
點擊復制文檔內容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1