Gameloft游戏开发面试题


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

  2. What are inline functions?

  3. What is memory alignment?

  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;
                 }
    };

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

  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个小时,自己合理安排。笔试中,如果你不能用英语很好的表达你自己的想法,可以使用中文。

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值