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

simple c++ program for "abcde123ba" convert "ab321edcba"
with out using string

Answer Posted / prasenjit roy

#include "stdio.h"

int main(int argc, char* argv[])
{
char sBuffer[]="abcde123ba";
char sBuff[100];
char *pStr = sBuffer;
int i;
puts(sBuffer);

while(*pStr != '\0')
++pStr;
for ( i = 0; pStr != sBuffer; i++,pStr--)
sBuff[i] = pStr[-1];
sBuff[i] = '\0';

puts(sBuff);
return 0;
}

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the best c++ book for beginners?

1087


How can virtual functions in c++ be implemented?

1054


Why can’t you call invariants() as the first line of your constructor?

954


What is the difference between *p++ and (*p)++ ?

1293


What is the v-ptr?

1100


What is a far pointer? where we use it?

1016


Is main a class in c++?

960


daily Routine of father

1349


Do vectors start at 0 c++?

973


Who invented turbo c++?

1012


Explain what are mutator methods in c++?

1063


What are the advantages of using a pointer? Define the operators that can be used with a pointer.

986


What is a catch statement?

981


What is conditions when using boolean operators?

1133


Why namespace is used in c++?

1010