Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

code for reverse alternate words from astring

Answer Posted / rohit

#include<stdio.h>
#include<conio.h>
int main()
{
char string[30]="hoow are you?";
static char stoken[15][10];
int i,j,k;
j=0;k=0;

for(i=0;string[i]!='\0';i++,k++)
{
if(string[i]==' ')
{
j++;
k=0;
}
else
{
stoken[j][k]=string[i];
}
}
for(i=j;i>=0;i--)
printf("%s\n",stoken[i]);
getch();


return 1;
}

Is This Answer Correct ?    6 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the data segment that is followed by c?

1082


What are the different types of C instructions?

1309


Is it better to use a macro or a function?

1157


What is the use of typedef in structure in c?

968


What is the acronym for ansi?

1047


Can a variable be both const and volatile?

1130


What is typedef example?

1179


What is structure and union in c?

1142


What does c mean before a date?

1175


What are the key features in c programming language?

1070


What is clrscr in c?

1131


Explain what are reserved words?

1103


What does 2n 4c mean?

1231


What is extern storage class in c?

994


Can you think of a logic behind the game minesweeper.

2463