Program to compute the word length of the host machine

Here is the program to compute the word length of the host machine.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "stdio.h"
#include "conio.h"
void main()
{
 int a,x;
 clrscr();
 x=sizeof(a);
 printf("%d\n",sizeof(a));
 if(x==2)
 {
  printf("Word length of host machine is 16 bits");
 }
 else
 {
  printf("It is a 32 bit machine");
 }
 getch();
}

4 Responses to “Program to compute the word length of the host machine”

Leave a Reply