Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  string splitting
Language: C/C++
Code:
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<iostream.h>
#include<ctype.h>
#include<process.h>
#include<string.h>
int i;
void main()
{
     char str1="h3llo this 1s 4 input string 001";
     for(i=0;i<strlen(str1);i++)
     {
          if(isalpha(str[i]))
               printf("All the strings in str1 are %s",str[i]);
          else
               break;
     }
     for(i=0;i<strlen(str1);i++)
     {
          if(isalnum(str[i]))
               printf("All the alphanumeric in str1 are %s",str[i]);
          else
               break;
     }
     for(i=0;i<strlen(str1);i++)
     {
          if(isdigit(str[i]))
               printf("All the Numbers in str1 are %s",str[i]);
          else
               break;
     }
     getch();
}
     
     
     
Comments: