Thanks Dian for the quick response. What if I am in the middle of program. I am not reading value from the user input. Ex.,
char *Query;
Query=(char *)malloc(sizeof(char)*500);
strcpy(Query,"AB123456");
Now how do I know whether Query string contains only integers or contains both...
Hi Guys,
I am new to C programming, How do I check if a string is an integer.
Eg., x="AB123456" -- In my program I want to print this is not an integer but if x="123456" I want to print this is an integer.
Any help greatly appreciated.
Thanks
Suann.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.