What is the Word Datatype in C?

This C Tutorial explains the Concept of ‘word’ in C Programming with Example(s).

A WORD in C Programming refers to ANSI Standard size of type int on Linux as 4 bytes or 32 bits. For example:

/* word_size.c -- Program displays size of a word on Linux Platform */
#include <stdio.h>
int main(void)
{
    int int_size;
 
    printf("Size of all integers is %d bytes\n", sizeof (int));
    printf("Size of integer variable int_size is %d bytes\n",
               sizeof int_size);
    return 0;
}

However, word size on some systems is 2 bytes. Note however that bigger the size of type int, larger the range of values can be stored. For instance on Linux system, the range of integers is:

/* Minimum and maximum values a `signed int' can hold. */
    Minimum Value     -2147483648
    Maximum Value      2147483647
 
/* Maximum value an `unsigned int' can hold. (Minimum is 0.)  */
    Maximum Value      4294967295U /* U stands as unsigned int */

Sanfoundry Global Education & Learning Series – 1000 C Tutorials.

advertisement
advertisement
If you wish to look at all C Tutorials, go to C Tutorials.

If you find any mistake above, kindly email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.