This program will help u to separate tokens and print them........!!!!
#include <stdio.h>
#include <string.h>
int main()
{
char text[80];
char *token;
printf("Enter a sentence:\n");
gets(text);
token=strtok(text, " ");
while(token != NULL)
{
printf(" %s\n",token);
token= strtok(NULL, " ");
}
}
please mail if any error in this given program or any clarification.....!!
#include <stdio.h>
#include <string.h>
int main()
{
char text[80];
char *token;
printf("Enter a sentence:\n");
gets(text);
token=strtok(text, " ");
while(token != NULL)
{
printf(" %s\n",token);
token= strtok(NULL, " ");
}
}
please mail if any error in this given program or any clarification.....!!
please do comment...!!!!!!
THANKS YOU..!!