Determining the word width in C
        Posted  
        
            by das_weezul
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by das_weezul
        
        
        
        Published on 2010-05-12T17:40:47Z
        Indexed on 
            2010/05/12
            17:44 UTC
        
        
        Read the original article
        Hit count: 229
        
Hi!
I'm learning C right now and so I'm fiddling about with pointers. Is there a way to determine the word width of the CPU in C because I'm writing a small program which prints it's own stack (Because I'm curious how it is structured), so that information would come in handy. Right now I'm using an int pointer, as an integer is 4 Bytes wide and I'm using a 32-bit Intel Atom CPU.
Thanks in advance, C gurus ;o)
© Stack Overflow or respective owner