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();
}
Chitra
Chitra

4 thoughts on “Program to compute the word length of the host machine

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest updates on your inbox

Be the first to receive the latest updates from Codesdoc by signing up to our email subscription.

    StudentProjects.in