How to get the size, min and max of short Data Type in C++

1 Answer

0 votes
#include <iostream>

using namespace std;

int main()
{
	cout << sizeof(short) << endl;
	cout << SHRT_MAX << endl;
	cout << SHRT_MIN << endl;
	
	return 0;
}


/*
run:

2
32767
-32768

*/

 



answered Dec 9, 2016 by avibootz
edited Dec 10, 2016 by avibootz

Related questions

1 answer 262 views
1 answer 255 views
1 answer 248 views
1 answer 206 views
1 answer 229 views
...