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

1 Answer

0 votes
#include <iostream>

using namespace std;

int main()
{
	cout << sizeof(unsigned char) << endl;
	cout << 0 << endl; // min
	cout << UCHAR_MAX << endl;

	return 0;
}


/*
run:

1
0
255

*/

 



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

Related questions

...