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...

Reverse a string word by word??

Answer Posted / anand

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
clrscr();
char a[]="i am anand";

int x,len,y,z;
len=strlen(a);
z=len-1;
for(x=len-1;x>=0;x--)
{
if(a[x]==' '||x==0)
{
for(y=x;y<=z;y++)
{
printf("%c",a[y]);
}
z=x;
}
}
getch();

}

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does * p ++ increment p or what it points to?

1143


How can you draw circles in C?

1168


What do mean by network ?

1178


How can I read in an object file and jump to locations in it?

1039


What is ambagious result in C? explain with an example.

2649


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

1098


How do you search data in a data file using random access method?

1315


What is the function of volatile in c language?

1150


What is wrong with this initialization?

1020


Why do we use & in c?

1008


Is c call by value?

1033


How do you convert strings to numbers in C?

1242


Describe the header file and its usage in c programming?

1083


Apart from dennis ritchie who the other person who contributed in design of c language.

1413


What is the heap in c?

1093