HOME VHDL CODES C PROGRAMS SOCCER BUZzz TECH INFO

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.....!!
please do comment...!!!!!!

THANKS YOU..!!

0 comments:

Post a Comment

Total Pageviews

About this blog

Contributors

Followers

Powered by Blogger.

Labels