Results 1 to 4 of 4

Thread: DWORD data type in c

  1. #1
    Join Date
    Jul 2009
    Posts
    12

    DWORD data type in c

    I'm new newbie to c, just finishes few chapters. My question is What is the DWORD data type? For what purpose we use the DWORD data type?

  2. #2
    Join Date
    Mar 2008
    Posts
    198

    Re: DWORD data type in c++

    DWORD is stands for a double word. In 16-bit machine word size would be 16 bit But on On a 32-bit machine, it would be 32 bits. And the double word size on 16 bit machine would be 32 bit and on 32bit machine it would be of 64 bit. However, that is very vendor dependent. If you use the 32-bit Microsoft compilers, a WORD and DWORD are the same size!! Since it deals with words, it is meant for low level use for instance bit patterns on an IO chip. If you want high level usage, use unsigned long.

  3. #3
    Join Date
    Jan 2008
    Posts
    1,521

    Re: DWORD data type in c++

    Here is the Double-word data typee explanation form powerbasic.com : Double-words are 32-bit (four byte) unsigned integers with a range of 0 to 4,294,967,295 ( 0 to 2^32-1). The type-specifier character for a Double-word is: ???.

    You can also declare Double word variables using the DWORD keyword with the DIM statement. For example: DIM I AS DWORD

    As for Word values and Integers, Double-word values have a larger positive range than a Long-integer, and still require only four bytes. Double-word values are useful for indicating absolute memory addresses, such as may be used to store pointer values.

  4. #4
    Join Date
    May 2008
    Posts
    2,389

    Re: DWORD data type in c

    I do believe that, in the Win32 API, 'DWORD' is a 'typedef' for 'unsigned long'. For Information about the underlying C/C++ data types, see Data Type Ranges. And also see this help Windows Data Types .

Similar Threads

  1. Data type and expressions
    By cloud101 in forum Software Development
    Replies: 1
    Last Post: 18-01-2012, 11:47 PM
  2. Replies: 7
    Last Post: 04-09-2010, 05:52 AM
  3. What is the purpose of converting data type?
    By snapper in forum Software Development
    Replies: 1
    Last Post: 16-07-2010, 11:00 AM
  4. Temporal Data Type In SQL
    By Amaresh in forum Software Development
    Replies: 5
    Last Post: 02-02-2010, 08:49 PM
  5. When to create User Defined Data Type in VB.Net
    By Nihar Khan in forum Software Development
    Replies: 3
    Last Post: 27-02-2009, 11:29 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,521,659.75796 seconds with 16 queries