PRO
Harkirat
asked

Expert
Abhay Jajodia answered
Hi Harkirat, in C, isdigit() returns 0 for false and any non-zero number for true, and the exact “true” number can be different depending on the system. So 2048 still just means true.
printf("%d\n", isdigit('8')); // non-zero means true (could be 2048)
If you have more questions, I am here to help.
C
This question was asked as part of the Learn C Programming course.
Our Experts
Sudip BhandariHead of Growth/Marketing
Apekchhya ShresthaSenior Product Manager
Kelish RaiTechnical Content Writer
Abhilekh GautamSystem Engineer
Palistha SinghTechnical Content Writer
Sarthak BaralSenior Content Editor
Saujanya Poudel
Abhay Jajodia
Nisha SharmaTechnical Content Writer
Udayan ShakyaTechnical Content Writer
