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

Is it possible for the objects to read and write themselves?

1122


Why is it called c++?

1046


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

1042


What is the average salary of a c++ programmer?

1025


What is object in c++ example?

1124


Why was c++ made?

1115


What is protected inheritance?

1057


Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement

1191


What are multiple inheritances (virtual inheritance)?

1067


Can member data be public?

1045


What language does google use?

1179


How is new() different from malloc()?

1142


Describe private, protected and public?

1088


What is static function? Explain with an example

1087


Which operator cannot be overloaded c++?

1022