[ create a new paste ] login | about

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

C, pasted on Nov 30:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>

typedef int16_t my_type;

my_type value = 0xFC7F;

int main(int argc, const char * argv[])
{
  printf("0x%" PRId16 "\n", value);
  printf("Type uses %lu bytes\n", sizeof(my_type));
  return 0;
}


Output:
1
2
0x-897
Type uses 2 bytes


Create a new paste based on this one


Comments: