Data types of LONG, INT, SHORT, CHAR

To define the data types such as LONG, INT, SHORT, CHAR write a program?

E

Expert

Verified

The data type like LONG, INT, SHORT, CHAR does not describe the specific length and it can be determined only by the host machine.

a. It defines that the bits which are used with each of the types and the notation used for the above mentioned types.

b. The LONG is being referred by the prefix l whose upper-case is L.

c. INT is a variable that can be prefixed with i or ui that indicates the integer as well as unsigned integers.

d. CHAR is prefixed with c or uc which also mean character and unsigned character respectively.

e. The size of the data types are platform independent and the size of the variable also not matter.

f. They can be defined as:-

typedef long LONG;
typedef unsigned long ULONG;
typedef int INT;
typedef unsigned int UINT;
typedef short SHORT;
typedef unsigned short USHORT;
typedef char CHAR;
typedef unsigned char UCHAR;

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.