What is wrong with this code? it is for my University practical assignment..
After a long time coding in C almost Forgot everything I find it very difficult.. help me correct the code #include <stdio.h> #include<string.h> #include<ctype.h> int main() { char str[1000],digit String[1000] = {0}; printf ("\nEnter the string:"); gets(str); char*ptr = strtok(str," "); while (ptr) { int len = strlen(ptr); bool integer = true ; for (int i=0; i<len;i++) { if(isdigit (ptr[i]! = true)) { integer = false; break ; } } if(integer ==true) { strcat(digit String,ptr); strcat(digit String," "); } ptr = strtok (NULL," ") ; } printf ("\n\n Integer numbers within the string are:"); puts(digitString) ; return 0; }