Gameloft written question [Online Network Programmer Test]

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.