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

How can I manipulate individual bits?

1024


How do I use void main?

1081


A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

2108


A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference

1090


What is auto keyword in c?

1190


Can stdout be forced to print somewhere other than the screen?

1036


What is infinite loop?

1073


Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

1236


Tell us bitwise shift operators?

1076


How do you sort filenames in a directory?

1161


7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.

2737


What is the difference between typedef struct and struct?

1094


How many parameters should a function have?

1168


What are all different types of pointers in c?

1000


What is the use of bitwise operator?

1109