Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

noko

Name: noko 2011-11-12 3:08

Is there any alternative means (besides those similar to the one depicted) to assign the binary/hexadecimal value of a float?

http://images.4chan.org/g/src/1321083834256.png


#include <stdio.h>

int main(void) {
    float pi;
    char *testPi;
    testPi = (char *)&pi;

    testPi[3] = 0x40;
    testPi[2] = 0x49;
    testPi[1] = 0x0F;
    testPi[0] = 0xDB;

    printf("%3.80f\n", pi);
   
    return 0;
}

Name: FrozenVoid !!mJCwdV5J0Xy2A21 2011-11-12 3:28

>>2
You can't
Mods don't delete posts unless its:
1.spam
2.someone annoys them enough on 4chan secret IRC channel so they come down and manually find posts they don't like and delete them one by one(example:some of my posts from 2009)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List