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

pgm to reverse string using arrays i.e god is love becomes
love is god)
(assumption:only space is used for seperation of words)

no addtional memory used.i.e no temporary arrays can used.

Answer Posted / ruchi

#include<stdio.h>
#include<conio.h>
int main()
{
int i=0,c;
char a[20];
printf("\nEnter the string");
while((a[i++]=getchar())!='\n');
printf("\nReverse of the string is ");
for(c=i;c>=0;c++)
{
printf("%c"a[c]);
}
getch();
}

Is This Answer Correct ?    1 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of pointers used in c language?

1059


What does 3 mean in texting?

1119


What is const and volatile in c?

1057


Is main is user defined function?

1162


Explain what is meant by high-order and low-order bytes?

1056


What is a rvalue?

1211


A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(

2261


What are the 4 types of functions?

1064


Tell us something about keyword 'auto'.

1079


What is null pointer constant?

1180


Can the “if” function be used in comparing strings?

1063


what are bit fields in c?

1732


what will be the output for the following main() { printf("hi" "hello"); }

11029


What is the process to generate random numbers in c programming language?

1188


how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

3333