Gameloft遊戲開發面試

  1. What numbers are considerd "true" when doing a logical operation?數組

  2. What are inline functions?less

  3. What is memory alignment?ide

  4. 指針,傳地址,引用區別?函數

  5. What are the possible problems when implicitly using copy constructor?工具

  6. Explain the need for "Virtual Destructor"?優化

  7. Write the output:指針

    class A
    {
          public:
                 A()
                 {
                  cout<<"1"<<endl;
                 }
                 ~A()
                 {
                  cout<<"2"<<endl;
                 }
                 void Print()
                 {
                  cout<<"3"<<endl;
                 }
    };繼承

    class B: public A
    {
          public:
                 B()
                 {
                  cout<<"4"<<endl;
                 }
                 virtual ~B()
                 {
                  cout<<"5"<<endl;
                 }
                 virtual void Print()
                 {
                  cout<<"6"<<endl;
                 }
    };ip

        A* a = (A*)new B; 
        a->Print(); 
        B* b = (B*)new C;
        b->Print();內存

        delete a;

        delte b;

  8. 給出了許多類(人物,裝備,交通工具,場景等)讓你畫類UML圖,注意類之間的繼承關係。

  9. 優化問題

    (1)int a = b*4;

    (2)int a = b*72;

      (3) int a = b%1;

      (4) int a = b %16;

     (5) int a = (b+c)/2;

     (6) int a = (b %3)/8;

  10. Implement a function that prints the numbers from 1 to 100.  But for mutiples only for 3 print "Three" instead of the number, and for mutipless only for 5 print "Five" instead of the number and for mutiples for both 3 and 5 print "ThreeFive" instead of the number.

  11. Implement the following compression function.實現函數,輸入是字符串「AABBBCDDDDD」,要求輸出是"2A3BC5D"(字符串中都是字母表中的字母)String Compress(String text);

    Compress("AABBBCCCCCDDDF"); //輸出是  2A3B5C3DF

    Compress("XXYYYZXXX");//輸出是2X3YZ3X

    Compress("XYZ"); //輸出是XYZ

  12. (實現函數,將32位RGB(8位標記(沒用)+8位R+8位G+8位B),輸出爲16位RGB(5+6+5)格式)。Implement the following convertion function.

    unsigned short ConvertRGB8888toRGB565(unsigned int nSourceColor);

    Parameters: 32 bits color as converted color

    return: 16 bits color

    Color Help: RED = 0x00FF0000;

                        GREEN = 0x0000FF00;

                        BLUE = 0x000000FF;

                        WHITE = 0x00FFFFFF;

                        BLACK = 0x00000000;

上機題

  1. 給出了剛起步一個俄羅斯方塊的項目,實現具體如下5個地方

    (1)每個方塊出現的時候都是在左上角,修改代碼,實現,方塊出現的地方,是屏幕的正上方。

    (2)完善F函數,該函數的做用是在方塊下落過程當中,若是判斷方塊改變形狀之後會不會超出屏幕。

    (3)有內存泄露,找到並修改。

    (4)數組MAP[AAA][BBBB]的具體含義是什麼,在數組定義以前中中英文說明。

    (5)暫時忘記了,想到了再補上這一條

其餘說明:筆試和上級的總共時間是4個小時,本身合理安排。筆試中,若是你不能用英語很好的表達你本身的想法,能夠使用中文。

相關文章
相關標籤/搜索