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

Here is alphabets : abcdefgh
1) how to reverse. as hgfedcba
2) after reversal, how to group them in a pair hg fe dc ba.

Answer Posted / ruchi

#include<stdio.h>
#include<conio.h>
#include<string.h>
int main()
{
int i,c;
char p[]="abcdefgh";
i=strlen(p);
for(c=i;c>=0;c--)
{
printf("%c",p[c]);
}
for(c=i;c>=0;c--)
{
printf("%c",p[c]);
if(c%2==0)
{
printf(" ");
}
}
getch();
}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

pierrot's divisor program using c or c++ code

2172


How do I determine whether a character is numeric, alphabetic, and so on?

1072


What are the restrictions of a modulus operator?

1066


How do I use strcmp?

1027


Is there a way to compare two structure variables?

1061


Is stack a keyword in c?

1042


What is switch in c?

1049


Is it possible to pass an entire structure to functions?

944


In c programming language, how many parameters can be passed to a function ?

1056


What is difference between structure and union?

1082


What is getche() function?

990


What is an auto keyword in c?

1048


develop algorithms to add polynomials (i) in one variable

2111


Explain about block scope in c?

1034


What is c language in simple words?

1017