×

C++ Tutorial

C++ Data types

C++ Operators & Keywords

C++ Conditional Statements

C++ Functions

C++ 'this' Pointer, References

C++ Class & Objects

C++ Constructors & Destructors

C++ Operator overloading

C++ 11 (Advance C++)

C++ Preparation

C++ Header Files & Functionsr

Data Structure with C++

C++ - Miscellaneous

C++ Programs

LLONG_MIN constant with example in C++

C++ LLONG_MIN constant: Here, we are going to learn about the LLONG_MIN macro constant of climits header in C++.
Submitted by IncludeHelp, on May 03, 2019

C++ LLONG_MIN macro constant

LLONG_MIN constant is a macro constant which is defied in climits header, it is used to get the minimum value of a long long int object, it returns the minimum value that a long long int object can store, which is -9223372036854775808 (on 32 bits compiler).

Note:

  • The actual value depends on the compiler architecture or library implementation.
  • We can also use <limits.h> header file instead of <climits> header as LLONG_MIN constant is defined in both of the libraries.

Syntax

Syntax of LLONG_MIN constant:

LLONG_MIN

Sample Input and Output

Constant call:
cout << LLONG_MIN;

Output:
-9223372036854775808

Example 1

C++ code to demonstrate example of LLONG_MIN constant with climits header:

// C++ code to demonstrate example of // LLONG_MIN constant with climits header #include<iostream> #include<climits> using namespace std; int main() { //prinitng the value of LLONG_MIN cout<<"LLONG_MIN: "<<LLONG_MIN<<endl; return 0; }

Output

LLONG_MIN: -9223372036854775808

Example 2

C++ code to demonstrate example of LLONG_MIN constant with limits.h header file:

// C++ code to demonstrate example of // LLONG_MIN constant with <limits.h> header file #include<iostream> #include<limits.h> using namespace std; int main() { //prinitng the value of LLONG_MIN cout<<"LLONG_MIN: "<<LLONG_MIN<<endl; return 0; }

Output

LLONG_MIN: -9223372036854775808


Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.