Thread: Explain this C code in english

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    19
    Ok so if the first pass is: 65 - (0*1664117991)

    Would the second pass be: 66 - (65*1664117991)?

    If so, then my output on the second pass would be a huge number.

    And once I do each pass, am I adding up the numbers then? I've been scribbling on paper like you said for the last 10 mins trying to figure this out x_x ..sorry.

  2. #2
    Fountain of knowledge.
    Join Date
    May 2006
    Posts
    794
    Quote Originally Posted by soadlink
    Ok so if the first pass is: 65 - (0*1664117991)

    Would the second pass be: 66 - (65*1664117991)?

    If so, then my output on the second pass would be a huge number.

    And once I do each pass, am I adding up the numbers then? I've been scribbling on paper like you said for the last 10 mins trying to figure this out x_x ..sorry.
    Something to remember is that program always returns an int, which can only be of
    a certain size depending on the computers word length for an integer, this can vary
    on different computers, it might be 16 bit on on some older computers, 32 bit (probably)
    on current computers, and maybe 64 bit on 64 bit machines, AMD64 for example.

    Anyway you need to sort out the word lengths and bit sizes etc (not too sure of them my
    self!!) and ensure they are the same in visual basic (or make modifications to enuse this).
    Basically it takes an input string and generates a code based upon the 'key' 0x63306CE7
    and the input string (I think this is known as a 'hash key' but, whatever it generates
    a code as output).

    It should be fairly easy to get the loop going in VB you just need to make sure the
    data sizes work to produce the same result.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can someone explain this code?
    By Sharke in forum C++ Programming
    Replies: 3
    Last Post: 06-18-2009, 12:12 PM
  2. Could someone explain this code for me please...
    By JoshR in forum C++ Programming
    Replies: 89
    Last Post: 06-26-2005, 01:20 AM
  3. Seems like correct code, but results are not right...
    By OmniMirror in forum C Programming
    Replies: 4
    Last Post: 02-13-2003, 01:33 PM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. Replies: 4
    Last Post: 01-16-2002, 12:04 AM