[ create a new paste ] login | about

Link: http://codepad.org/IRCiWUyg    [ raw code | output | fork ]

appunti2 - C, pasted on May 2:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
int main (void)
{
    long int i = 123;
    char *p = (char *) &i;
    if (*p == 123)
      {
        printf ("little endian\n");
      }
    else
      {
        printf ("big endian\n");
      }
    getchar ();
    return 0;
}


Output:
1
little endian


Create a new paste based on this one


Comments: