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 249 views
1 answer 241 views
1 answer 238 views
1 answer 196 views
1 answer 221 views
...