I am currently looking for a cute and smart girl, feel free to contact me!
You can follow me on twitter there


22Apr

Google Summer of Code & NT debugging Puzzler #3

Windows

As you probably know, Google launch every year the Summer of Code. Yesterday, Google published official 2008 result and I’ll be part of the Samba Team. My work is to implement compression functions into Samba.

Microsoft Advanced Windows Debugging Team published their third puzzler: Matrix Edition #3 . It looks they’ll publish one puzzler per week. As far I understand, the goal of this puzzler is to translate a function from Assembly to C.

Here is my solution:

    1. void myfun(char *string)
    2. {
    3. int lenString, countLoop, index;
    4. char savedByte;
    5. lenString = strlen(string);
    6.      for (countLoop = lenString; countLoop; countLoop–)
    7.      {
    8.          for(index = 0; index < (countLoop - 1); index++)
    9.          {
    10.              if (string[index] > string[index + 1])
    11.              {
    12.                  savedByte = string[index];
    13.                  string[index] = string[index + 1];
    14.                  string[index + 1] = savedByte;
    15.              }
    16.          }
    17.      }
    18. }

Tuesday, April 22nd, 2008 at 3:17 pm and is filed under Windows. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave us a comment