<strike id="6q0um"></strike>
  • <strike id="6q0um"><s id="6q0um"></s></strike>
  • <ul id="6q0um"></ul><strike id="6q0um"></strike>

    當前位置:高考升學網(wǎng) > 招聘筆試題 > 正文

    Sony筆試題和面試題答案(二)

    更新:2023-09-15 16:40:45 高考升學網(wǎng)

      25.完成下列程序

      

      ..

      ......

      ............

      ....................

      ..............................

      ..........................................

      ........................................................

      #include

      #define N 8

      int main()

      {

      int i;

      int j;

      int k;

      ---------------------------------------------------------

      | |

      | |

      | |

      ---------------------------------------------------------

      return 0;

      }

      26 完成程序,實現(xiàn)對數(shù)組的降序排序

      #include

      void sort( );

      int main()

      {

      int array[]={45,56,76,234,1,34,23,2,3}; //數(shù)字任//意給出

      sort( );

      return 0;

      }

      void sort( )

      {

      ____________________________________

      | |

      | |

      |-----------------------------------------------------|

      }

      27 費波那其數(shù)列,1,1,2,3,5……編寫程序求第十項。可以用遞歸,也可以用其他方

      法,但要說明你選擇的理由。

      #include

      int Pheponatch(int);

      int main()

      {

      printf("The 10th is %d",Pheponatch(10));

      return 0;

      }

      int Pheponatch(int N)

      {

      --------------------------------

      | |

      | |

      --------------------------------

      }

      28 下列程序運行時會崩潰,請找出錯誤并改正,并且說明原因。

      #include

      #include

      typedef struct{

      TNode left;

      TNode right;

      int value;

      } TNode;

      TNode root=NULL;

      void append(int N);

      int main()

      {

      append(63);

      append(45);

      append(32);

      append(77);

      append(96);

      append(21);

      append(17); // Again, 數(shù)字任意給出

      }

      void append(int N)

      {

      TNode NewNode=(TNode )malloc(sizeof(TNode));

      NewNode->value=N;

      if(root==NULL)

      {

      root=NewNode;

      return;

      }

      else

      {

      TNode temp;

      temp=root;

      while((N>=temp.value && temp.left!=NULL) || (N

      NULL

      ))

      {

      while(N>=temp.value && temp.left!=NULL)

      temp=temp.left;

      while(N

      temp=temp.right;

      }

      if(N>=temp.value)

      temp.left=NewNode;

      else

      temp.right=NewNode;

      return;

      }

      }

      29. A class B network on the internet has a subnet mask of 255.255.240.0, what

      is the maximum number of hosts per subnet .

      a. 240 b. 255 c. 4094 d. 6553

      4

      30. What is the difference: between o(log n) and o(log n^2), where both logari

      thems have base 2 .

      a. o(log n^2) is bigger b. o(log n) is bigger

      c. no difference

      31. For a class what would happen if we call a class’s constructor from with

      the same class’s constructor .

      a. compilation error b. linking error

      c. stack overflow d. none of the above

      32. “new” in c++ is a: .

      a. library function like malloc in c

      b. key word c. operator

      d. none of the above

      33. Which of the following information is not contained in an inode .

      a. file owner b. file size

      c. file name d. disk address

      34. What’s the number of comparisons in the worst case to merge two sorted li

      sts containing n elements each .

      a. 2n b.2n-1 c.2n+1 d.2n-2

      35. Time complexity of n algorithm T(n), where n is the input size ,is T(n)=T(

      n-1)+1/n if n>1 otherwise 1 the order of this algorithm is .

      a. log (n) b. n c. n^2 d. n^n

      36. The number of 1’s in the binary representation of 34096+ 15256+516+3 a

      re .

      a. 8 b. 9 c. 10 d. 12

      37.設計函數(shù) int atoi(char s)。

      38.int i=(j=4,k=8,l=16,m=32); printf(“%d”, i); 輸出是多少?

      39.解釋局部變量、全局變量和靜態(tài)變量的含義。

      40.解釋堆和棧的區(qū)別。

      41.論述含參數(shù)的宏與函數(shù)的優(yōu)缺點。

      42. 以下三條輸出語句分別輸出什么?[C易]

      char str1[] = "abc";

      char str2[] = "abc";

      const char str3[] = "abc";

      const char str4[] = "abc";

      const char str5 = "abc";

      const char str6 = "abc";

      cout << boolalpha << ( str1==str2 ) << endl; // 輸出什么?

      cout << boolalpha << ( str3==str4 ) << endl; // 輸出什么?

      cout << boolalpha << ( str5==str6 ) << endl; // 輸出什么?

      答:分別輸出false,false,true。str1和str2都是字符數(shù)組,每個都有其自己的存儲區(qū),它們的值則是各存儲區(qū)首地址,不等;str3和str4同上,只是按const語義,它們所指向的數(shù)據(jù)區(qū)不能修改。str5和str6并非數(shù)組而是字符指針,并不分配存儲區(qū),其后的“abc”以常量形式存于靜態(tài)數(shù)據(jù)區(qū),而它們自己僅是指向該區(qū)首地址的指針,相等。

    相關文章

    最新圖文

    2020年河北新聞網(wǎng)兩學一做

    時間:2023-09-18 07:0:24

    2020年河北新聞網(wǎng)兩學一做

    時間:2023-09-15 11:0:59

    兩學一做學習教育知

    時間:2023-09-21 06:0:30

    2020年開展兩學一做學習教

    時間:2023-09-19 21:0:30
    亚洲国产精品尤物yw在线| 国产偷国产偷亚洲高清在线| 久久久久亚洲AV成人网人人网站 | 中国china体内裑精亚洲日本| 亚洲国产成人精品青青草原| 亚洲精品韩国美女在线| 亚洲精品第一国产综合精品| 伊人久久综在合线亚洲2019| 久久精品国产亚洲AV高清热 | 亚洲国产欧美国产综合一区| 亚洲av永久无码天堂网| 亚洲heyzo专区无码综合| 亚洲AV日韩AV永久无码色欲| 国产亚洲福利一区二区免费看 | 精品亚洲成A人在线观看青青| 国产AV无码专区亚洲AV麻豆丫| 国产AV无码专区亚洲AV蜜芽| 亚洲阿v天堂在线2017免费| 亚洲а∨天堂久久精品| 久久精品国产亚洲7777| 亚洲日韩国产精品第一页一区 | 亚洲熟女精品中文字幕| 亚洲AV女人18毛片水真多| 亚洲av无码成人精品区在线播放| 亚洲精品成人区在线观看| 亚洲熟妇av一区二区三区漫画| 久久精品国产69国产精品亚洲| 亚洲邪恶天堂影院在线观看| 亚洲日韩中文字幕| 亚洲色偷偷偷综合网| 婷婷亚洲天堂影院| 亚洲一区二区三区自拍公司| 久久亚洲精品成人| 亚洲国产精品免费在线观看| 亚洲综合无码无在线观看| www国产亚洲精品久久久日本| 曰韩亚洲av人人夜夜澡人人爽| 亚洲av日韩综合一区在线观看| 亚洲第一成年人网站| 亚洲人成网站18禁止| 亚洲国产香蕉人人爽成AV片久久 |