Skip to content

Instantly share code, notes, and snippets.

View jaredscheib's full-sized avatar
💭
🍍🤙🏼✨

Jared Scheib jaredscheib

💭
🍍🤙🏼✨
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jaredscheib on github.
  • I am jaredscheib (https://keybase.io/jaredscheib) on keybase.
  • I have a public key ASD8L5OPuzlnk-kais45GJMHSU1_7q_-1NnFO7PydDfn9go

To claim this, I am signing this object:

@jaredscheib
jaredscheib / endian_test.c
Last active May 27, 2018 04:38
Determine if computer processor is using little endian or big endian
#include <stdio.h>
int main () {
char x = 'x';
char z = 'z';
__int32_t w = x*(1<<24) + z;
__int32_t* p = &w;
char o = *(char*)p;
if (o == z) {