NI筆試題

software
1) char *p[] = {"a", "b", "c", "d", "e"}
    printf("%d/n", sizeof(p)); //sizeof(pointer)*5=20
2)  int p[] = {1, 2, 3, 4, 5}
    printf("%d/n", *p++);  // 1
    printf("%d/n", *++p); // 3
3)  實現int strncmp(const string *p1, const string *p2, const int n);
4)  說明protected函數可以被什麼樣類型的函數訪問
5) struct A{
       unsigned char status;
       unsinged long value;
    }
    兩個成員變量的偏移,這樣寫法的缺點,如何改正。
6)class A{
   public:
       static int GetValue(){return m_value;}
   private:
       int m_value;
   }
   這樣寫法的錯誤
7) 實現SingleTon
8) 還有一道虛函數的題,只要知道概念就會做
9)作文,現在通訊方式和原始通訊方式的比較,類似於TOEFL的八卦文。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章