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

What is wrong with this program statement? void = 10;

1225


How can I list all of the predefined identifiers?

950


What are the advantages and disadvantages of c language?

982


Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.

1377


Why is C language being considered a middle level language?

1082


What are multibyte characters?

1074


What is the general form of function in c?

996


write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3

2039


What is the difference between procedural and functional programming?

1036


Explain low-order bytes.

998


a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list

1030


What is data structure in c language?

1077


What is build process in c?

1105


What is function definition in c?

1042


Explain how can I read and write comma-delimited text?

1132