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

C is shit

Name: Anonymous 2011-11-30 19:50

Why have short and int if by the standard they end up being the same size number of bits.


Is the following correct:

char        => 8 bits
short       => 16 bits
int         => 16 bits
long        => 32 bits
long long   => 64 bits

float       => 32 bits
double      => 64 bits
long double => 128 bits


whats the point of short?

Name: Anonymous 2011-11-30 21:00

>>8

#ifndef _STDINT_H
#define _STDINT_H

/* 7.18.1.1  Exact-width integer types */
typedef signed char int8_t;
typedef unsigned char   uint8_t;
typedef short  int16_t;
typedef unsigned short  uint16_t;
typedef int  int32_t;
typedef unsigned   uint32_t;
typedef long long  int64_t;
typedef unsigned long long   uint64_t;


typedef int int32_t


So you're telling me if i use a normal `int' i have a risk of it being 2-4 bytes, but if i use int32_t it'll be 32 bits every time?

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