<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                一、不定項選擇題 1、以下程序的打印結果是() ~~~ #include<iostream> using namespace std; void swap_int(int a , int b) { int temp = a; a = b; b = temp; } void swap_str(char* a , char* b) { char* temp = a; a = b; b = temp; } int main(void) { int a = 10; int b = 5; char* str_a = "hello world"; char* str_b = "world hello"; swap_int(a , b); swap_str(str_a , str_b); printf("%d %d %s %s\n", a , b , str_a , str_b); return 0; } ~~~ A、10 5 hello world world hello???? B、10 5 world hello hello world C、5 10 hello world world hello???? D、5 10 hello world world hello 2、以下程序打印的兩個字符分別是(A) ~~~ typedef struct object object; struct object { char data[3]; }; int main(void) { object obj_array[3] = { {'a','b','c'}, {'d','e','f'}, {'g','h','i'} }; object* cur = obj_array; printf("%c %c\n", *(char*)((char *)(cur)+2) , *(char*)(cur+2)); return 0; } ~~~ A、c g?????????? B、b d????????? C、g g????????? D、g c 3、C/C++語言:請問在64位平臺機器下 sizeof(string_a) , sizeof(string_b)大小分別是(A) ~~~ char *string_a = (char *)malloc(100*sizeof(char)); char string_b[100]; ~~~ A、8 100????? B、100 8????? C、100 100????? D、8 8 4、假設二叉排序樹的定義是:1、若它的左子樹不為空,則左子樹所有節點均小于它的根節點的值;2、若右子樹不為空,則右子樹所有節點的值均大于根節點的值;3、它的左右子樹也分別為二叉排序樹。下列哪種遍歷之后得到一個遞增有序數列(B) A、前序遍歷??? B、中序遍歷???? C、后序遍歷????? D、廣度遍歷 5、往一個棧順序push下列元素:ABCDE,其pop可能的順序,下列不正確的是(C) A、BACDE??? B、ACDBE???? C、AEBCD?? D、AEDCB 6、1100|1010 , 1001^1001 , 1001&1100分別為(A) A、1110? 0000?? 1000?? B、1000? 1001? 1000 C、1110? 1001?? 0101?? D、1000? 1001? 1000 7、二叉樹是一種樹形結構,每個節點至多有兩顆子樹,下列一定是二叉樹的是(AC) A、紅黑樹???? B、B樹????? C、AVL樹????? D、B+樹 8、int A[2][3] = {1,2,3,4,5,6}; , 則A[1][0]和*(*(A+1)+1)的值分別是(A) A、4 5???? B、4 3??????? C、3 5?????? D、3 4 9、序列16 14 10 8 7 9 3 2 4 1的說法下面哪一個正確(A) A、大頂堆?? B、小頂堆? C、不是堆?? D、二叉排序樹 10、輸入若已經是排好序的,下列排序算法最快的是(A) A、插入排序?? B、Shell排序?? C、合并排序?? D、快速排序 11、一種既有利于短作業又兼顧長期作業的調度方式是(D) A、先來先服務???? B、均衡調度????? C、最短作業優先????? D、最高響應比優先 12、同一進程下的線程可以共享(B) A、stack??????? B、data section??????? C、register set????? D、thread ID 13、系統中的“顛簸”是由(B)引起的。 A、內存容量不足????? B、缺頁率高????? C、交換信息量大?????? D、缺頁率反饋模型不正確 14、8瓶酒一瓶有毒,用人測試。每次測試結果8小時后才會得出,而你只有8個小時的時間。問最少需要(B)人測試? A、2???????? B、3???????? C、4??????????? D、6 是3個人,如果你學過數的2進制編碼,就容易說了: 8瓶酒的編碼如下: 0: 000 1: 001 2: 010 3: 011 4: 100 5: 101 6: 110 7: 111 3個人分別喝3個位上為1的編碼,所以: 第一個:1,3,5,7 第二個:2,3,6,7 第三個:4,5,6,7 把中毒的人的位填1的二進制數,就是毒酒的編號。 15、下列關于網絡編程錯誤的是(AB) A、TCP建立和關閉連接都只需要三次握手 B、UDP是可靠服務 C、主動關閉的一端會出現TIME_WAIT狀態 D、服務端編程會調用listen(),客戶端也可以調用bind() 16、進程間通訊有哪幾種形式(ABCD) A、Socket B、Pipe C、Shared memory D、Signal 17、TCP/UDP下面正確的是(AC) A、TCP provide connection-oriented,byte-stream service; B、Both TCP and UDP provide reliability service; C、TCP also provides flow control; D、Both TCP and UDP provide retransmission mechanism; 18、分布式系統設計包括(ABCDE) A、容錯,design for fault B、多數據中心的數據一致性 C、數據/服務可靠性 D、可擴展性 E、要滿足ACID特性 19、10個不同的球,放入3個不同的桶內,共有(C)種方法。? 3^10 A、1000????? B、720???? C、59049???? D、360 20、87的100次冪除以7的余數是多少(D) A、1???? B、2???? C、3???? D、4 二、簡答題: 1、 (1)請描述進程和線程的區別? (2)多線程程序有什么優點、缺點? (2)多進程程序有什么優點、缺點?與多線程相比,有何區別? 2、編程題: 寫代碼,反轉一個單鏈表,分別以迭代和遞歸的形式來實現 ~~~ typedef struct node LinkNode; struct node { int data; LinkNode* next; }; ~~~ // 返回新鏈表頭節點 LinkNode *reverse_link(LinkNode *head) LinkNode *reverse_link_recursive(LinkNode *head) ~~~ // 返回新鏈表頭節點 LinkNode *reverse_link(LinkNode *head) { if(head == NULL) return NULL; LinkNode *prev , *curr , *reverse_head , *temp; prev = NULL , curr = head; while(curr->next) { temp = curr->next; curr->next = prev; prev = curr; curr = temp; } curr->next = prev; reverse_head = curr; return reverse_head; } LinkNode *reverse_link_recursive(LinkNode *head) { if(head == NULL) return NULL; LinkNode *curr , *reverse_head , *temp; if(head->next == NULL) // 鏈表中只有一個節點,逆轉后的頭指針不變 return head; else { curr = head; temp = head->next; // temp為(a2,...an)的頭指針 reverse_head = reverse_link_recursive(temp); // 逆轉鏈表(a2,...an),并返回逆轉后的頭指針 temp->next = curr; // 將a1鏈接在a2之后 curr->next = NULL; } return reverse_head; // (a2,...an)逆轉鏈表的頭指針即為(a1,a2,...an)逆轉鏈表的頭指針 } ~~~ 3、給一個數組,元素都是整數(有正數也有負數),尋找連續的元素相加之和為最大的序列。 如:1、-2、3、5、-4、6 連續序列3、5、-4、6的和最大。 如元素全為負數,則最大的和為0,即一個也沒有選。 /* array[]???? 輸入數組 n?????????? 數組元素個數 ?????????? 返回最大序列和 */ int find_max_sum(int array[] , int n) ~~~ int find_max_sum(int array[] , int n) { int i , max , sum; sum = max = array[0]; for(i = 1 ; i < n ; ++i) { if(sum < 0) sum = array[i]; else sum += array[i]; if(sum > max) max = sum; } if(max < 0) max = 0; return max; } ~~~ 三、設計題 1、設計一個圖片存儲系統:假設有一個相冊系統,每個用戶不限制上傳的圖片數目,每張相片壓縮后都在1M以內,需求如下: (1)文件數量太大,采用傳統的文件系統存儲導致目錄系統非常臃腫,訪問速度變得緩慢; (2)單機存儲容量已經遠遠不能承載所有的文件; (3)上傳之后,用戶只有讀取操作和刪除操作,不支持修改,整個系統讀寫比例10:1 思路:可以使用分布式的文件系統,覺得hadoop的HDFS很符合要求,這是hadoop對googleGDFS的實現。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看