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

1 Answer

0 votes
#include <iostream>

using namespace std;

int main()
{
	cout << sizeof(char) << endl;
	cout << CHAR_MAX << endl;
	cout << CHAR_MIN << endl;
	
	return 0;
}


/*
run:

1
127
-128

*/

 



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

Related questions

1 answer 213 views
1 answer 209 views
1 answer 223 views
1 answer 162 views
1 answer 168 views
...