i m giving u the word extracting program..once u can extract all the words in a sentence then u can handle each words one by one...

Code:
# include<stdio.h>
# include<conio.h>
# include<malloc.h>
# include<string.h>

void main()
{
int i=0,j=0,k=0;
char temp[10];
char p[50]; //maximum length of the sentence
char q[10][10]; //maximum number of words it can hold is 10 and each having maximum size 10
clrscr();

gets(p);   //get the string


while(p[i]!='\0')
{
if(p[i]==' ')
{
temp[j]='\0';
j=0;
strcpy(q[k],temp);
++k;
++i;
}
else
{
temp[j]=p[i];
j++;
i++;
}
}

temp[j]='\0';
strcpy(q[k],temp);


for(i=0;i<=k;i++)
puts(q[i]);       //finally the 2d array contains all the words.



getch();  //run the program by giving sample senetence "this is my book"
}