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

what is the role you expect in software industry?

2204


What is structure of c program?

1233


Explain what are linked list?

1094


What does sizeof int return?

1137


What is pass by reference in functions?

914


What are header files and what are its uses in C programming?

1340


What are the types of c language?

1085


Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1155


what type of questions arrive in interview over c programming?

2088


What is the advantage of a random access file?

1259


What does c mean before a date?

1234


What library is sizeof in c?

1143


How can I split up a string into whitespace-separated fields?

1111


Should a function contain a return statement if it does not return a value?

1138


What is string function in c?

1052