-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path4.cpp
29 lines (27 loc) · 1.82 KB
/
4.cpp
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
//Problem 4
//Write a program in C++ to check the upper and lower limits of data types
#include <iostream>
#include <climits>
using namespace std;
int main()
{
cout << "Check the upper and lower limits of : "<<endl;
cout << "--------------------------------------------------\n";
cout << " The maximum limit of int data type : " << INT_MAX << endl;
cout << " The minimum limit of int data type : " << INT_MIN << endl;
cout << " The maximum limit of unsigned int data type : " << UINT_MAX << endl;
cout << " The maximum limit of long long data type : " << LLONG_MAX << endl;
cout << " The minimum limit of long long data type : " << LLONG_MIN << endl;
cout << " The maximum limit of unsigned long long data type : " << ULLONG_MAX << endl;
cout << " The Bits contain in char data type : " << CHAR_BIT << endl;
cout << " The maximum limit of char data type : " << CHAR_MAX << endl;
cout << " The minimum limit of char data type : " << CHAR_MIN << endl;
cout << " The maximum limit of signed char data type : " << SCHAR_MAX << endl;
cout << " The minimum limit of signed char data type : " << SCHAR_MIN << endl;
cout << " The maximum limit of unsigned char data type : " << UCHAR_MAX << endl;
cout << " The minimum limit of short data type : " << SHRT_MIN << endl;
cout << " The maximum limit of short data type : " << SHRT_MAX << endl;
cout << " The maximum limit of unsigned short data type : " << USHRT_MAX << endl;
cout << endl;
return 0;
}