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的八卦文。

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