-
Notifications
You must be signed in to change notification settings - Fork 32
/
Data Types.c
52 lines (42 loc) · 1.75 KB
/
Data Types.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <stdio.h>
#include <float.h>
#include <limits.h>
int main ()
{
short int;printf ("\n Min value of short int = %hd", SHRT_MIN);
printf ("\n Max value of short int = %hd", SHRT_MAX);
printf ("\n Size of short int = %d\n",sizeof(short int));
unsigned short int usi = 0;
printf ("\n Max value of unsigned short int = %hu", USHRT_MAX);
printf ("\n Min value of unsigned short int = %hu", usi);
printf ("\n Size of unsigned short int = %d\n",sizeof(unsigned short int));
unsigned int ui = 0;
printf ("\n Max value of unsigned int = %u", UINT_MAX);
printf ("\n Min value of unsigned int = %hu", ui);
printf ("\n Size of unsigned int = %d\n",sizeof(unsigned int));
int;
printf ("\n Min value of int = %d", INT_MIN);
printf ("\n Max value of int = %d", INT_MAX);
printf ("\n Size of int = %d\n",sizeof(int));
long int;
printf ("\n Min value of long int = %ld", LONG_MIN);
printf ("\n Max value of long int = %ld", LONG_MAX);
printf ("\n Size of long int = %d\n",sizeof(long int));
unsigned long int uli = 0;
printf ("\n Max value of unsigned long int = %lu", ULONG_MAX);
printf ("\n Min value of unsigned long int = %lu", uli);
printf ("\n Size of unsigned long int = %d\n",sizeof(unsigned long int));
float;
printf("\n Min value of float = %e",FLT_MIN);
printf ("\n Max value of float = %e", FLT_MAX);
printf ("\n Size of float = %d\n",sizeof(float));
double;
printf("\n Min value of double = %e",DBL_MIN);
printf ("\n Max value of double = %e", DBL_MAX);
printf ("\n Size of double = %d\n",sizeof(double));
long double;
printf ("\n Min value of long double = %Le", LDBL_MIN);
printf ("\n Max value of long double = %Le", LDBL_MAX);
printf ("\n Size of long double = %d\n",sizeof(long double));
return 0;
}