Gameloft written questions are in English, the front is all theoretical, the last two are programming topics.
1
2
3
4
5
The last two programming topics are actually fairly simple:
#include <stdio.h> #include <string.h> #include <iostream> std::string itoa (int number) {char nstr[15];sprintf (nstr, "%d", number); return std::string (NSTR);} Using namespace Std;string compress (string text) {string finalstr= ""; string str= ""; char comp=0;int ncomp=0;for (int i=0;i <text.length () +1/* \0*/;i++ at the end of the string) {//cout<< "text[" <<i<< "]=" <<text[i]<<endl;if ( Text[i]!=comp && ncomp>0) {Finalstr+=itoa (ncomp); finalstr+=comp;comp=text[i];ncomp=1;} Else{ncomp++;if (ncomp==1) comp=text[i];} cout<< "finalstr=" <<finalstr<<endl;return finalstr;} int onebitcount (int nnumber) {int z=0;int n=nnumber;for (int i=0;i<32;i++) {if (n&0x01==1) z++;//printf ("n=%d N &1 =%d z=%d\n ", n,n&0x1,z); n=n>>1;} return z;} int main () {printf ("Compress aabbbcccccaadddddd =%s", Compress (String ("aabbbcccccaadddddd")). C_str ());p rintf ("636 Onebitcount is%d\n ", Onebitcount (636)); return 0;}
Most of the front is empty, some do not know what meaning, some do not.
I am the interview C + + background development, you give me the knowledge of the test game programming, alas, will not!
Is it not very good for me to disclose Gmaeloft's face test? Inform me interview also didn't tell me is English, game programming concept is more.
In my opinion, C + + all revolves around data and algorithms, as long as the foundation is good enough, others can work in the study. This test, reminds me of the school exam, this is still no information, not prepared in advance.