Answers for "c++ char is a number"

C++
1

c++ check if char is number

char c = '1';
bool result = isdigit(c);
cout << result << endl; //1
Posted by: Guest on September-05-2020
0

c++ char it is a number

#include<ctype.h>
--------
char c = '1';
bool result = isdigit(c);
if(result)
	cout << "Yes, it is digit" << endl;
else
	cout << "No, it is't digit" << endl;
Posted by: Guest on January-02-2022

Browse Popular Code Answers by Language